Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-06-05 11:37:45 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-06-22 14:06:47 +0300
commitb7c34c889b6158d542648f31133f201d330201eb (patch)
treeefa9edcb1e27945a0b218d2ff666526b2bd8d2aa /intern/cycles/util/util_task.cpp
parentf9d138be51e6f28b4796ac3959c6ff2ed6c5d1c7 (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.cpp8
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()