mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-22 22:53:36 +00:00
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.
This commit is contained in:
parent
b3d6f7bdd8
commit
c1bd602e4c
1 changed files with 2 additions and 2 deletions
|
@ -33,9 +33,9 @@ void DetachedTasks::AddTask(std::function<void()> task) {
|
|||
++instance->count;
|
||||
std::thread([task{std::move(task)}]() {
|
||||
task();
|
||||
std::unique_lock lock{instance->mutex};
|
||||
std::unique_lock thread_lock{instance->mutex};
|
||||
--instance->count;
|
||||
std::notify_all_at_thread_exit(instance->cv, std::move(lock));
|
||||
std::notify_all_at_thread_exit(instance->cv, std::move(thread_lock));
|
||||
}).detach();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue