mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-28908 Change ReplSetConfig return type from 'const int' to 'int'
This commit is contained in:
parent
f34a8c5ab9
commit
49140247ca
@ -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) {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user