diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-10-15 01:51:29 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-10-15 18:07:06 -0400 |
commit | 3a15fac7d854802c99ed287ba2d8f0bd6d09212b (patch) | |
tree | db58f0580014d508b5dd2cc9fba49029349fa81e /src/mongo/tools | |
parent | 1c33a98ebf1a0caa5694fcc9a026bf1949c92f65 (diff) | |
download | mongo-3a15fac7d854802c99ed287ba2d8f0bd6d09212b.tar.gz |
hookup google cpplint, and make "scons lint" run the checks we pass on now
including a few that i made pass
Diffstat (limited to 'src/mongo/tools')
-rw-r--r-- | src/mongo/tools/tool.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/tools/tool.cpp b/src/mongo/tools/tool.cpp index b81cc8d4ad4..261b28ccf33 100644 --- a/src/mongo/tools/tool.cpp +++ b/src/mongo/tools/tool.cpp @@ -307,8 +307,10 @@ namespace mongo { DBClientBase& Tool::conn( bool slaveIfPaired ) { if ( slaveIfPaired && _conn->type() == ConnectionString::SET ) { - if (!_slaveConn) - _slaveConn = &((DBClientReplicaSet*)_conn)->slaveConn(); + if (!_slaveConn) { + DBClientReplicaSet* rs = static_cast<DBClientReplicaSet*>(_conn); + _slaveConn = &rs->slaveConn(); + } return *_slaveConn; } return *_conn; |