summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-04-21 12:56:33 -0400
committerJudah Schvimer <judah@mongodb.com>2017-04-21 12:56:33 -0400
commit49140247ca85644438e7394b6950f7687fbd4c91 (patch)
tree0e328769d57a478b5211f6c3fca003c13885c388
parentf34a8c5ab964df8e590b1164c030c65759f96477 (diff)
downloadmongo-49140247ca85644438e7394b6950f7687fbd4c91.tar.gz
SERVER-28908 Change ReplSetConfig return type from 'const int' to 'int'
-rw-r--r--src/mongo/db/repl/repl_set_config.cpp4
-rw-r--r--src/mongo/db/repl/repl_set_config.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/repl/repl_set_config.cpp b/src/mongo/db/repl/repl_set_config.cpp
index 2fbbd7cad52..0cd9945b7dc 100644
--- a/src/mongo/db/repl/repl_set_config.cpp
+++ b/src/mongo/db/repl/repl_set_config.cpp
@@ -629,7 +629,7 @@ const MemberConfig* ReplSetConfig::findMemberByID(int id) const {
return NULL;
}
-const int ReplSetConfig::findMemberIndexByHostAndPort(const HostAndPort& hap) const {
+int ReplSetConfig::findMemberIndexByHostAndPort(const HostAndPort& hap) const {
int x = 0;
for (std::vector<MemberConfig>::const_iterator it = _members.begin(); it != _members.end();
++it) {
@@ -641,7 +641,7 @@ const int ReplSetConfig::findMemberIndexByHostAndPort(const HostAndPort& hap) co
return -1;
}
-const int ReplSetConfig::findMemberIndexByConfigId(long long configId) const {
+int ReplSetConfig::findMemberIndexByConfigId(long long configId) const {
int x = 0;
for (const auto& member : _members) {
if (member.getId() == configId) {
diff --git a/src/mongo/db/repl/repl_set_config.h b/src/mongo/db/repl/repl_set_config.h
index 63d5bcb80e8..3f226ae9295 100644
--- a/src/mongo/db/repl/repl_set_config.h
+++ b/src/mongo/db/repl/repl_set_config.h
@@ -172,13 +172,13 @@ public:
* Returns a MemberConfig index position corresponding to the member with the given
* HostAndPort in the config, or -1 if there is no member with that address.
*/
- const int findMemberIndexByHostAndPort(const HostAndPort& hap) const;
+ int findMemberIndexByHostAndPort(const HostAndPort& hap) const;
/**
* Returns a MemberConfig index position corresponding to the member with the given
* _id in the config, or -1 if there is no member with that address.
*/
- const int findMemberIndexByConfigId(long long configId) const;
+ int findMemberIndexByConfigId(long long configId) const;
/**
* Gets the default write concern for the replica set described by this configuration.