summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-01-09 19:13:44 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-01-11 10:19:17 +0000
commit21b0635ffe1490311bfc988f7046383ee458c990 (patch)
tree8d90e1b02ce495d98a53b5ed5cf3cf12688b5af4 /storage
parenta1f31b81a6a40e5b1929e565d08ab66215db5556 (diff)
Move the shared_ptr
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index e899d2b958e..e7c53516b58 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -622,7 +622,7 @@ FileStorHandlerImpl::getNextMessage(uint16_t disk, uint8_t maxPriority)
LOG(debug, "Message %s waited %" PRIu64 " ms in storage queue, timeout %d",
m.toString().c_str(), waitTime, static_cast<api::StorageCommand&>(m).getTimeout());
- std::shared_ptr<api::StorageMessage> msg(iter->_command);
+ std::shared_ptr<api::StorageMessage> msg = std::move(iter->_command);
idx.erase(iter); // iter not used after this point.
if (!messageTimedOutInQueue(*msg, waitTime)) {
@@ -630,7 +630,7 @@ FileStorHandlerImpl::getNextMessage(uint16_t disk, uint8_t maxPriority)
takeDiskBucketLockOwnership(t, id, *msg));
MBUS_TRACE(trace, 9, "FileStorHandler: Got lock on bucket");
lockGuard.broadcast(); // XXX: needed here?
- return {std::move(locker), msg};
+ return {std::move(locker), std::move(msg)};
} else {
std::shared_ptr<api::StorageReply> msgReply(
makeQueueTimeoutReply(*msg));