From bcb393628eae10c4cd44380fac0c3158d5e55776 Mon Sep 17 00:00:00 2001 From: Shen-Ta Hsieh Date: Tue, 30 May 2023 02:13:25 +0800 Subject: [PATCH] win32/ComWorker: rename variable name to prevent ambiguous --- src/win32/ComWorker.hxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/win32/ComWorker.hxx b/src/win32/ComWorker.hxx index 4016d9939..58d53dc85 100644 --- a/src/win32/ComWorker.hxx +++ b/src/win32/ComWorker.hxx @@ -52,17 +52,17 @@ public: using R = std::invoke_result_t>; auto promise = std::make_shared>(); auto future = promise->get_future(); - Push([function = std::forward(function), - promise = std::move(promise)]() mutable { + Push([func = std::forward(function), + prom = std::move(promise)]() mutable { try { if constexpr (std::is_void_v) { - std::invoke(std::forward(function)); - promise->set_value(); + std::invoke(std::forward(func)); + prom->set_value(); } else { - promise->set_value(std::invoke(std::forward(function))); + prom->set_value(std::invoke(std::forward(func))); } } catch (...) { - promise->set_exception(std::current_exception()); + prom->set_exception(std::current_exception()); } }); return future;