diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-11-12 18:38:38 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-11-15 13:24:34 +0000 |
commit | b9b5c473d165c4ed59d012a9cd8e4c96dc546b74 (patch) | |
tree | d42c43e4772133e8953131cf486561a5ac7479b6 /src/common/threadpool.cpp | |
parent | Merge pull request #6097 (diff) | |
download | monero-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 '')
-rw-r--r-- | src/common/threadpool.cpp | 2 |
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; |