diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2015-10-22 10:34:51 -0400 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2015-10-30 15:47:26 -0400 |
commit | 791c412874ce87d9cc1eac75edce8116a9d40640 (patch) | |
tree | cdaaeaefd1d093d88ff9a5332a68a8e440b124fa /src/mongo/rpc/command_reply_builder.h | |
parent | e62e2e71eff397caf22a0da13ac4669a8546b298 (diff) | |
download | mongo-791c412874ce87d9cc1eac75edce8116a9d40640.tar.gz |
SERVER-20609 do not heap allocate Message
Diffstat (limited to 'src/mongo/rpc/command_reply_builder.h')
-rw-r--r-- | src/mongo/rpc/command_reply_builder.h | 6 |
1 files changed, 3 insertions, 3 deletions
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> 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<Message> 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 _message; State _state{State::kMetadata}; }; |