summaryrefslogtreecommitdiff
path: root/src/mongo/client/query.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-06-09 19:20:07 -0400
committerMathias Stearn <mathias@10gen.com>2017-06-19 17:08:35 -0400
commit1babec6a705c242628a765935ac9d98b56a41218 (patch)
tree1b917e39f921cce0a2cd41db170ea6c22e6348bc /src/mongo/client/query.h
parenta9a849b21ced693f2345d4507ee14541818244d9 (diff)
downloadmongo-1babec6a705c242628a765935ac9d98b56a41218.tar.gz
SERVER-29564 BSONObjBuilder can now be seeded with a BSONObj prefix
This will avoid copying whenever it is safe.
Diffstat (limited to 'src/mongo/client/query.h')
-rw-r--r--src/mongo/client/query.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/client/query.h b/src/mongo/client/query.h
index 4a4a97bd9b8..3ced9c591f4 100644
--- a/src/mongo/client/query.h
+++ b/src/mongo/client/query.h
@@ -164,8 +164,7 @@ private:
template <class T>
void appendComplex(const char* fieldName, const T& val) {
makeComplex();
- BSONObjBuilder b;
- b.appendElements(obj);
+ BSONObjBuilder b(std::move(obj));
b.append(fieldName, val);
obj = b.obj();
}