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) {
|
while (true) {
|
||||||
Message message = queue_.Pop();
|
Message message = queue_.Pop();
|
||||||
|
|
||||||
const bool should_continue =
|
const bool should_continue = std::visit(
|
||||||
std::visit([this](auto &&msg) { return Process(std::forward<decltype(msg)>(msg)); }, std::move(message));
|
[this](auto &&msg) { return this->Process(std::forward<decltype(msg)>(msg)); }, std::move(message));
|
||||||
|
|
||||||
if (!should_continue) {
|
if (!should_continue) {
|
||||||
return;
|
return;
|
||||||
|
@ -183,7 +183,7 @@ class ShardManager {
|
|||||||
MG_ASSERT(address.last_known_ip == to.last_known_ip);
|
MG_ASSERT(address.last_known_ip == to.last_known_ip);
|
||||||
|
|
||||||
SendToWorkerByUuid(to.unique_id, shard_worker::RouteMessage{
|
SendToWorkerByUuid(to.unique_id, shard_worker::RouteMessage{
|
||||||
.message = std::forward<ShardMessages>(sm),
|
.message = std::move(sm),
|
||||||
.request_id = request_id,
|
.request_id = request_id,
|
||||||
.to = to,
|
.to = to,
|
||||||
.from = from,
|
.from = from,
|
||||||
|
Loading…
Reference in New Issue
Block a user