diff options
author | Tad Marshall <tad@10gen.com> | 2012-08-02 05:55:24 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-08-31 11:44:37 -0400 |
commit | 15624a7a7e60ce1f50fc50f6cba54398b2af17d2 (patch) | |
tree | a6f830ee48e31ad7a0a69bd13fe97fa42c16b94e /src/mongo/client/syncclusterconnection.h | |
parent | 1f8725142aee6cd4598ff360f638055e44557bec (diff) | |
download | mongo-15624a7a7e60ce1f50fc50f6cba54398b2af17d2.tar.gz |
SERVER-6908 Don't pass strings by value
Change lots of code to take <string> arguments by const ref instead
of by value; minor changes to surrounding code.
Diffstat (limited to 'src/mongo/client/syncclusterconnection.h')
-rw-r--r-- | src/mongo/client/syncclusterconnection.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/client/syncclusterconnection.h b/src/mongo/client/syncclusterconnection.h index 3907f7e50a0..02cc864bed4 100644 --- a/src/mongo/client/syncclusterconnection.h +++ b/src/mongo/client/syncclusterconnection.h @@ -51,7 +51,10 @@ namespace mongo { */ SyncClusterConnection( const list<HostAndPort> &, double socketTimeout = 0); SyncClusterConnection( string commaSeparated, double socketTimeout = 0); - SyncClusterConnection( string a , string b , string c, double socketTimeout = 0 ); + SyncClusterConnection( const std::string& a, + const std::string& b, + const std::string& c, + double socketTimeout = 0 ); ~SyncClusterConnection(); /** @@ -114,7 +117,7 @@ namespace mongo { const BSONObj *fieldsToReturn, int queryOptions, int batchSize ); int _lockType( const string& name ); void _checkLast(); - void _connect( string host ); + void _connect( const std::string& host ); string _address; vector<string> _connAddresses; |