From 791c412874ce87d9cc1eac75edce8116a9d40640 Mon Sep 17 00:00:00 2001 From: Adam Midvidy Date: Thu, 22 Oct 2015 10:34:51 -0400 Subject: SERVER-20609 do not heap allocate Message --- src/mongo/rpc/command_reply_builder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mongo/rpc/command_reply_builder.h') diff --git a/src/mongo/rpc/command_reply_builder.h b/src/mongo/rpc/command_reply_builder.h index 92c567f64a6..b91b335fcdc 100644 --- a/src/mongo/rpc/command_reply_builder.h +++ b/src/mongo/rpc/command_reply_builder.h @@ -54,7 +54,7 @@ public: * Constructs an OP_COMMANDREPLY in an existing buffer. Ownership of the buffer * will be transfered to the CommandReplyBuilder. */ - CommandReplyBuilder(std::unique_ptr message); + CommandReplyBuilder(Message&& message); CommandReplyBuilder& setMetadata(const BSONObj& metadata) final; CommandReplyBuilder& setRawCommandReply(const BSONObj& commandReply) final; @@ -73,7 +73,7 @@ public: * The behavior of calling any methods on the object is subsequently * undefined. */ - std::unique_ptr done() final; + Message done() final; std::size_t availableBytes() const final; @@ -86,7 +86,7 @@ private: // Default values are all empty. BufBuilder _builder{}; - std::unique_ptr _message; + Message _message; State _state{State::kMetadata}; }; -- cgit v1.2.1