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 d55fd001bc
commit 2d11cc25c1

View File

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