From c3f5a085aed81a4d06c77de1fe4e12ec6dc3d37e Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Tue, 19 May 2015 16:58:51 -0400 Subject: SERVER-18568 Remove ConnectionString::PAIR It is not used anywhere. --- src/mongo/client/connection_string.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/mongo/client/connection_string.cpp') 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 -- cgit v1.2.1