diff options
author | Aaron <aaron@10gen.com> | 2009-03-19 16:23:04 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-03-19 16:23:04 -0400 |
commit | 5a276ef621d94465c474e95dde8b457f878b2bb0 (patch) | |
tree | 896d91c1485b187d6a626bbde8cb3439428e55f1 /db/cloner.cpp | |
parent | fdde87047f33a31a35636de71a02a98bb673ad5b (diff) | |
download | mongo-5a276ef621d94465c474e95dde8b457f878b2bb0.tar.gz |
Replace emptyObj with BSONObj()
Diffstat (limited to 'db/cloner.cpp')
-rw-r--r-- | db/cloner.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/db/cloner.cpp b/db/cloner.cpp index 279f56f3b01..e46112d2cfe 100644 --- a/db/cloner.cpp +++ b/db/cloner.cpp @@ -37,7 +37,7 @@ namespace mongo { class Cloner: boost::noncopyable { auto_ptr< DBClientWithCommands > conn; void copy(const char *from_ns, const char *to_ns, bool isindex, bool logForRepl, - bool masterSameProcess, bool slaveOk, BSONObj query = emptyObj); + bool masterSameProcess, bool slaveOk, BSONObj query = BSONObj()); void replayOpLog( DBClientCursor *c, const BSONObj &query ); public: Cloner() { } @@ -160,7 +160,7 @@ namespace mongo { } else { conn.reset( new DBDirectClient() ); } - c = conn->query( ns.c_str(), emptyObj, 0, 0, 0, slaveOk ? Option_SlaveOk : 0 ); + c = conn->query( ns.c_str(), BSONObj(), 0, 0, 0, slaveOk ? Option_SlaveOk : 0 ); } if ( c.get() == 0 ) { errmsg = "query failed " + ns; @@ -378,7 +378,7 @@ namespace mongo { } BSONObj query = cmdObj.getObjectField("query"); if ( query.isEmpty() ) - query = emptyObj; + query = BSONObj(); BSONElement copyIndexesSpec = cmdObj.getField("copyindexes"); bool copyIndexes = copyIndexesSpec.isBoolean() ? copyIndexesSpec.boolean() : true; // Will not be used if doesn't exist. @@ -422,7 +422,7 @@ namespace mongo { } BSONObj query = cmdObj.getObjectField("query"); if ( query.isEmpty() ) - query = emptyObj; + query = BSONObj(); BSONElement copyIndexesSpec = cmdObj.getField("copyindexes"); bool copyIndexes = copyIndexesSpec.isBoolean() ? copyIndexesSpec.boolean() : true; // Will not be used if doesn't exist. @@ -479,7 +479,7 @@ namespace mongo { } BSONObj query = fromToken.getObjectField("query"); if ( query.isEmpty() ) { - query = emptyObj; + query = BSONObj(); } long long cursorId = 0; BSONElement cursorIdToken = fromToken.getField( "cursorId" ); |