diff options
author | Geir Storli <geirst@verizonmedia.com> | 2020-10-26 11:09:49 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2020-10-26 11:09:49 +0000 |
commit | 36c660bc1faff21f1566552092668b3cff9ce58d (patch) | |
tree | 012e10dea2a179dea912b0ed3dedc82502fe40e8 | |
parent | f41815b4118b3e98dce00a5a94be94334fe6e29c (diff) |
Use noexcept and prefix iterator increment.
3 files changed, 3 insertions, 3 deletions
diff --git a/storage/src/vespa/storage/persistence/asynchandler.cpp b/storage/src/vespa/storage/persistence/asynchandler.cpp index f7f83b36df3..5344553dd45 100644 --- a/storage/src/vespa/storage/persistence/asynchandler.cpp +++ b/storage/src/vespa/storage/persistence/asynchandler.cpp @@ -182,7 +182,7 @@ AsyncHandler::handleRemove(api::RemoveCommand& cmd, MessageTracker::UP trackerUP } bool -AsyncHandler::is_async_message(api::MessageType::Id type_id) +AsyncHandler::is_async_message(api::MessageType::Id type_id) noexcept { switch (type_id) { case api::MessageType::PUT_ID: diff --git a/storage/src/vespa/storage/persistence/asynchandler.h b/storage/src/vespa/storage/persistence/asynchandler.h index 82057af39a7..92bf72e7c51 100644 --- a/storage/src/vespa/storage/persistence/asynchandler.h +++ b/storage/src/vespa/storage/persistence/asynchandler.h @@ -25,7 +25,7 @@ public: MessageTrackerUP handlePut(api::PutCommand& cmd, MessageTrackerUP tracker) const; MessageTrackerUP handleRemove(api::RemoveCommand& cmd, MessageTrackerUP tracker) const; MessageTrackerUP handleUpdate(api::UpdateCommand& cmd, MessageTrackerUP tracker) const; - static bool is_async_message(api::MessageType::Id type_id); + static bool is_async_message(api::MessageType::Id type_id) noexcept; private: static bool tasConditionExists(const api::TestAndSetCommand & cmd); bool tasConditionMatches(const api::TestAndSetCommand & cmd, MessageTracker & tracker, diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 7adfc508344..14074b65c5c 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -931,7 +931,7 @@ FileStorHandlerImpl::Stripe::get_next_async_message(monitor_guard& guard) PriorityIdx::iterator iter(idx.begin()), end(idx.end()); while ((iter != end) && operationIsInhibited(guard, iter->_bucket, *iter->_command)) { - iter++; + ++iter; } if ((iter != end) && AsyncHandler::is_async_message(iter->_command->getType().getId())) { return getMessage(guard, idx, iter); |