diff options
author | Mathias Stearn <mathias@10gen.com> | 2013-09-30 18:53:53 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2013-10-11 13:00:53 -0400 |
commit | 257292ade0ce14ca4785ca9889b0579be8a3e36b (patch) | |
tree | f112929c9f8d9f8ccb23d2bd82fc6bd77694c22c /src/mongo/db/pipeline/document_source_merge_cursors.cpp | |
parent | e76e27acacd2e2665e741be3cb58b4071f6616a4 (diff) | |
download | mongo-257292ade0ce14ca4785ca9889b0579be8a3e36b.tar.gz |
Don't require a pointer to BSONElement in pipeline parsing.
Prevents use of rvalues among other annoying issues.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_merge_cursors.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_merge_cursors.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/document_source_merge_cursors.cpp b/src/mongo/db/pipeline/document_source_merge_cursors.cpp index d3f4c5f1bcf..d89d1475c09 100644 --- a/src/mongo/db/pipeline/document_source_merge_cursors.cpp +++ b/src/mongo/db/pipeline/document_source_merge_cursors.cpp @@ -59,14 +59,14 @@ namespace mongo { } intrusive_ptr<DocumentSource> DocumentSourceMergeCursors::createFromBson( - BSONElement* pBsonElement, + BSONElement elem, const intrusive_ptr<ExpressionContext>& pExpCtx) { - massert(17026, string("Expected an Array, but got a ") + typeName(pBsonElement->type()), - pBsonElement->type() == Array); + massert(17026, string("Expected an Array, but got a ") + typeName(elem.type()), + elem.type() == Array); CursorIds cursorIds; - BSONObj array = pBsonElement->embeddedObject(); + BSONObj array = elem.embeddedObject(); BSONForEach(cursor, array) { massert(17027, string("Expected an Object, but got a ") + typeName(cursor.type()), cursor.type() == Object); |