From 8f2564f1a64e4984b0e299d58b2616d3a2815262 Mon Sep 17 00:00:00 2001 From: Zhilei Chen <2522134184@qq.com> Date: Tue, 23 Jun 2020 11:54:18 +0800 Subject: [PATCH] fix a bug that move a const variable (#9080) --- src/ray/raylet/worker_pool.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ray/raylet/worker_pool.cc b/src/ray/raylet/worker_pool.cc index e5430979a..bbe370dd3 100644 --- a/src/ray/raylet/worker_pool.cc +++ b/src/ray/raylet/worker_pool.cc @@ -389,14 +389,14 @@ void WorkerPool::PushWorker(const std::shared_ptr &worker) { // The worker is used for the actor creation task with dynamic options. // Put it into idle dedicated worker pool. const auto task_id = it->second; - state.idle_dedicated_workers[task_id] = std::move(worker); + state.idle_dedicated_workers[task_id] = worker; } else { // The worker is not used for the actor creation task without dynamic options. // Put the worker to the corresponding idle pool. if (worker->GetActorId().IsNil()) { - state.idle.insert(std::move(worker)); + state.idle.insert(worker); } else { - state.idle_actor[worker->GetActorId()] = std::move(worker); + state.idle_actor[worker->GetActorId()] = worker; } } }