diff options
Diffstat (limited to 'src/mongo/db/pipeline/document_source_out.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_out.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/document_source_out.h b/src/mongo/db/pipeline/document_source_out.h index 853d2b3a9e9..68dcaa838ed 100644 --- a/src/mongo/db/pipeline/document_source_out.h +++ b/src/mongo/db/pipeline/document_source_out.h @@ -128,7 +128,7 @@ public: * */ struct BatchedObjects { - void emplace(BSONObj obj, BSONObj key) { + void emplace(BSONObj&& obj, BSONObj&& key) { objects.emplace_back(std::move(obj)); uniqueKeys.emplace_back(std::move(key)); } @@ -155,8 +155,8 @@ public: /** * Writes the documents in 'batch' to the write namespace. */ - virtual void spill(const BatchedObjects& batch) { - pExpCtx->mongoProcessInterface->insert(pExpCtx, getWriteNs(), batch.objects); + virtual void spill(BatchedObjects&& batch) { + pExpCtx->mongoProcessInterface->insert(pExpCtx, getWriteNs(), std::move(batch.objects)); }; /** |