threaded_queue.hh: fix -Wpessimizing-move (#409)

This commit is contained in:
TÖRÖK Attila 2019-06-18 08:45:20 +02:00 committed by Fangrui Song
parent f54fac0303
commit 9f25474e73

View File

@ -147,7 +147,7 @@ public:
auto val = std::move(q->front()); auto val = std::move(q->front());
q->pop_front(); q->pop_front();
--total_count_; --total_count_;
return std::move(val); return val;
}; };
if (!priority_.empty()) if (!priority_.empty())
return execute(&priority_); return execute(&priority_);
@ -162,7 +162,7 @@ public:
auto val = std::move(q->front()); auto val = std::move(q->front());
q->pop_front(); q->pop_front();
--total_count_; --total_count_;
return std::move(val); return val;
}; };
if (priority_.size()) if (priority_.size())
return execute(&priority_); return execute(&priority_);