Avoid warning for not using captured this. Use std::move instead of forward where appropriate

This commit is contained in:
Tyler Neely 2022-11-04 14:13:15 +00:00
parent bb7c7f7627
commit 528e30a9be
2 changed files with 3 additions and 3 deletions

View File

@ -141,8 +141,8 @@ class CoordinatorWorker {
while (true) {
Message message = queue_.Pop();
const bool should_continue =
std::visit([this](auto &&msg) { return Process(std::forward<decltype(msg)>(msg)); }, std::move(message));
const bool should_continue = std::visit(
[this](auto &&msg) { return this->Process(std::forward<decltype(msg)>(msg)); }, std::move(message));
if (!should_continue) {
return;

View File

@ -183,7 +183,7 @@ class ShardManager {
MG_ASSERT(address.last_known_ip == to.last_known_ip);
SendToWorkerByUuid(to.unique_id, shard_worker::RouteMessage{
.message = std::forward<ShardMessages>(sm),
.message = std::move(sm),
.request_id = request_id,
.to = to,
.from = from,