diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2015-08-24 19:01:49 -0400 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2015-08-24 19:01:49 -0400 |
commit | f480380df5107c2204ebbd250282dec18cc2a20d (patch) | |
tree | 44a21ea502be97fdb51d04c9d3dcdaa259fc87c2 /src/mongo/rpc | |
parent | 246fd9b8c35ed500f556687e07ae3eb339819ae0 (diff) | |
download | mongo-f480380df5107c2204ebbd250282dec18cc2a20d.tar.gz |
SERVER-18668 remove some pessimizing and redundant moves
Diffstat (limited to 'src/mongo/rpc')
-rw-r--r-- | src/mongo/rpc/command_reply.cpp | 4 | ||||
-rw-r--r-- | src/mongo/rpc/command_request.cpp | 4 | ||||
-rw-r--r-- | src/mongo/rpc/document_range.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/rpc/command_reply.cpp b/src/mongo/rpc/command_reply.cpp index 954d6b051d6..b2472230e52 100644 --- a/src/mongo/rpc/command_reply.cpp +++ b/src/mongo/rpc/command_reply.cpp @@ -52,8 +52,8 @@ CommandReply::CommandReply(const Message* message) : _message(message) { const char* messageEnd = begin + length; ConstDataRangeCursor cur(begin, messageEnd); - _metadata = std::move(uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val); - _commandReply = std::move(uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val); + _metadata = uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val; + _commandReply = uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val; _outputDocs = DocumentRange(cur.data(), messageEnd); } diff --git a/src/mongo/rpc/command_request.cpp b/src/mongo/rpc/command_request.cpp index 961c4ba7d93..aec10f6fcd7 100644 --- a/src/mongo/rpc/command_request.cpp +++ b/src/mongo/rpc/command_request.cpp @@ -89,8 +89,8 @@ CommandRequest::CommandRequest(const Message* message) : _message(message) { (_commandName.size() >= kMinCommandNameLength) && (_commandName.size() <= kMaxCommandNameLength)); - _metadata = std::move(uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val); - _commandArgs = std::move(uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val); + _metadata = uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val; + _commandArgs = uassertStatusOK(cur.readAndAdvance<Validated<BSONObj>>()).val; _inputDocs = DocumentRange{cur.data(), messageEnd}; } diff --git a/src/mongo/rpc/document_range.cpp b/src/mongo/rpc/document_range.cpp index aff2cf6dfec..fd525a5e244 100644 --- a/src/mongo/rpc/document_range.cpp +++ b/src/mongo/rpc/document_range.cpp @@ -83,7 +83,7 @@ DocumentRange::const_iterator& DocumentRange::const_iterator::operator++() { if (_cursor.length() == 0) { *this = const_iterator{}; } else { - _obj = std::move(uassertStatusOK(_cursor.readAndAdvance<Validated<BSONObj>>()).val); + _obj = uassertStatusOK(_cursor.readAndAdvance<Validated<BSONObj>>()).val; } return *this; } |