Avoid warning for not using captured this. Use std::move instead of forward where appropriate
This commit is contained in:
parent
bb7c7f7627
commit
528e30a9be
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user