summaryrefslogtreecommitdiff
path: root/src/common/detached_tasks.cpp
diff options
context:
space:
mode:
authorGravatar Morph2022-05-26 20:33:55 -0400
committerGravatar Morph2022-06-13 18:19:22 -0400
commitc1bd602e4ce8db7b66e64c69d57fb3b8db8a8529 (patch)
treee6d7544381654e852da742a39004fdf17a79e775 /src/common/detached_tasks.cpp
parentyuzu: Eliminate variable shadowing (diff)
downloadyuzu-c1bd602e4ce8db7b66e64c69d57fb3b8db8a8529.tar.gz
yuzu-c1bd602e4ce8db7b66e64c69d57fb3b8db8a8529.tar.xz
yuzu-c1bd602e4ce8db7b66e64c69d57fb3b8db8a8529.zip
common: Eliminate variable shadowing
GCC/Clang treats variables within lambdas as potentially shadowing those outside the lambda, despite them not being captured inside the lambda's capture list.
Diffstat (limited to 'src/common/detached_tasks.cpp')
-rw-r--r--src/common/detached_tasks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/detached_tasks.cpp b/src/common/detached_tasks.cpp
index c1362631e..ec31d0b88 100644
--- a/src/common/detached_tasks.cpp
+++ b/src/common/detached_tasks.cpp
@@ -33,9 +33,9 @@ void DetachedTasks::AddTask(std::function<void()> task) {
33 ++instance->count; 33 ++instance->count;
34 std::thread([task{std::move(task)}]() { 34 std::thread([task{std::move(task)}]() {
35 task(); 35 task();
36 std::unique_lock lock{instance->mutex}; 36 std::unique_lock thread_lock{instance->mutex};
37 --instance->count; 37 --instance->count;
38 std::notify_all_at_thread_exit(instance->cv, std::move(lock)); 38 std::notify_all_at_thread_exit(instance->cv, std::move(thread_lock));
39 }).detach(); 39 }).detach();
40} 40}
41 41