summaryrefslogtreecommitdiff
path: root/src/mongo/rpc/metadata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/rpc/metadata.cpp')
-rw-r--r--src/mongo/rpc/metadata.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/rpc/metadata.cpp b/src/mongo/rpc/metadata.cpp
index e80daabaa15..74d511d5d4e 100644
--- a/src/mongo/rpc/metadata.cpp
+++ b/src/mongo/rpc/metadata.cpp
@@ -123,7 +123,7 @@ StatusWith<LegacyCommandAndFlags> downconvertRequestMetadata(BSONObj cmdObj, BSO
return std::make_tuple(ssmCommandBob.obj(), std::move(legacyQueryFlags));
}
-StatusWith<CommandReplyWithMetadata> upconvertReplyMetadata(BSONObj legacyReply) {
+StatusWith<CommandReplyWithMetadata> upconvertReplyMetadata(const BSONObj& legacyReply) {
BSONObjBuilder commandReplyBob;
BSONObjBuilder metadataBob;
@@ -135,7 +135,8 @@ StatusWith<CommandReplyWithMetadata> upconvertReplyMetadata(BSONObj legacyReply)
return std::make_tuple(commandReplyBob.obj(), metadataBob.obj());
}
-StatusWith<BSONObj> downconvertReplyMetadata(BSONObj commandReply, BSONObj replyMetadata) {
+StatusWith<BSONObj> downconvertReplyMetadata(const BSONObj& commandReply,
+ const BSONObj& replyMetadata) {
BSONObjBuilder legacyCommandReplyBob;
auto downconvertStatus =