aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-12 18:38:38 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-15 13:24:34 +0000
commitb9b5c473d165c4ed59d012a9cd8e4c96dc546b74 (patch)
treed42c43e4772133e8953131cf486561a5ac7479b6 /src/common
parentMerge pull request #6097 (diff)
downloadmonero-b9b5c473d165c4ed59d012a9cd8e4c96dc546b74.tar.xz
threadpool: use std::move when taking an element off the queue
It has a std::function, which can have a capture context, and the function runtime might be small
Diffstat (limited to 'src/common')
-rw-r--r--src/common/threadpool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/threadpool.cpp b/src/common/threadpool.cpp
index 2748c798c..38f52c45b 100644
--- a/src/common/threadpool.cpp
+++ b/src/common/threadpool.cpp
@@ -145,7 +145,7 @@ void threadpool::run(bool flush) {
if (!running) break;
active++;
- e = queue.front();
+ e = std::move(queue.front());
queue.pop_front();
lock.unlock();
++depth;