diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-06-05 11:37:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-06-22 14:06:47 +0300 |
commit | b7c34c889b6158d542648f31133f201d330201eb (patch) | |
tree | efa9edcb1e27945a0b218d2ff666526b2bd8d2aa /intern/cycles/util/util_task.cpp | |
parent | f9d138be51e6f28b4796ac3959c6ff2ed6c5d1c7 (diff) |
Cleanup: use move semantics for task pool functions
Diffstat (limited to 'intern/cycles/util/util_task.cpp')
-rw-r--r-- | intern/cycles/util/util_task.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp index 61aa28c6815..3599c99eb96 100644 --- a/intern/cycles/util/util_task.cpp +++ b/intern/cycles/util/util_task.cpp @@ -59,9 +59,9 @@ void TaskPool::push(Task *task, bool front) TaskScheduler::push(entry, front); } -void TaskPool::push(const TaskRunFunction &run, bool front) +void TaskPool::push(TaskRunFunction &&run, bool front) { - push(new Task(run), front); + push(new Task(std::move(run)), front); } void TaskPool::wait_work(Summary *stats) @@ -478,9 +478,9 @@ void DedicatedTaskPool::push(Task *task, bool front) queue_mutex.unlock(); } -void DedicatedTaskPool::push(const TaskRunFunction &run, bool front) +void DedicatedTaskPool::push(TaskRunFunction &&run, bool front) { - push(new Task(run), front); + push(new Task(std::move(run)), front); } void DedicatedTaskPool::wait() |