mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 15:53:18 +00:00
blocking_worker: Make use of templated lambda
We can simplify this a little by explicitly specifying the typename for the lambda function.
This commit is contained in:
parent
9652973db2
commit
188a3cf74c
|
@ -109,9 +109,8 @@ private:
|
||||||
while (keep_running) {
|
while (keep_running) {
|
||||||
work_event.Wait();
|
work_event.Wait();
|
||||||
|
|
||||||
const auto visit_fn = [service, &keep_running](auto&& w) {
|
const auto visit_fn = [service, &keep_running]<typename T>(T&& w) {
|
||||||
using T = std::decay_t<decltype(w)>;
|
if constexpr (std::is_same_v<std::decay_t<T>, std::monostate>) {
|
||||||
if constexpr (std::is_same_v<T, std::monostate>) {
|
|
||||||
keep_running = false;
|
keep_running = false;
|
||||||
} else {
|
} else {
|
||||||
w.Execute(service);
|
w.Execute(service);
|
||||||
|
|
Loading…
Reference in a new issue