summaryrefslogtreecommitdiff
path: root/src/mongo/client/connection_string.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-05-19 16:58:51 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-05-20 16:27:32 -0400
commitc3f5a085aed81a4d06c77de1fe4e12ec6dc3d37e (patch)
tree478f8270055423bcea7c6e05d31ef377cd13ec99 /src/mongo/client/connection_string.cpp
parentf99e271f7016fd52349f638f78fa0e6898596c44 (diff)
downloadmongo-c3f5a085aed81a4d06c77de1fe4e12ec6dc3d37e.tar.gz
SERVER-18568 Remove ConnectionString::PAIR
It is not used anywhere.
Diffstat (limited to 'src/mongo/client/connection_string.cpp')
-rw-r--r--src/mongo/client/connection_string.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/mongo/client/connection_string.cpp b/src/mongo/client/connection_string.cpp
index 5e8d5a817cb..d365a6fb50f 100644
--- a/src/mongo/client/connection_string.cpp
+++ b/src/mongo/client/connection_string.cpp
@@ -93,12 +93,6 @@ namespace mongo {
return true;
case MASTER:
return _servers[0] == other._servers[0];
- case PAIR:
- if ( _servers[0] == other._servers[0] )
- return _servers[1] == other._servers[1];
- return
- ( _servers[0] == other._servers[1] ) &&
- ( _servers[1] == other._servers[0] );
case SET:
return _setName == other._setName;
case SYNC:
@@ -136,9 +130,6 @@ namespace mongo {
if( numCommas == 0 )
return ConnectionString( HostAndPort( host ) );
- if ( numCommas == 1 )
- return ConnectionString( PAIR , host );
-
if ( numCommas == 2 )
return ConnectionString( SYNC , host );
@@ -146,14 +137,12 @@ namespace mongo {
return ConnectionString(); // INVALID
}
- std::string ConnectionString::typeToString( ConnectionType type ) {
- switch ( type ) {
+ std::string ConnectionString::typeToString(ConnectionType type) {
+ switch (type) {
case INVALID:
return "invalid";
case MASTER:
return "master";
- case PAIR:
- return "pair";
case SET:
return "set";
case SYNC:
@@ -161,8 +150,8 @@ namespace mongo {
case CUSTOM:
return "custom";
}
- verify(0);
- return "";
+
+ MONGO_UNREACHABLE;
}
} // namespace mongo