From 32b6fc40622a838d4785d5e2dbea4ee17447c362 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 12 Jul 2020 15:38:16 -0400 Subject: gc_adapter: Remove deprecated usage of = in lambda captures It's deprecated in C++20 to use = to capture the this pointer. Instead, we can simply pass this as an argument to the thread constructor. --- src/input_common/gcadapter/gc_adapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input_common/gcadapter') diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp index 9fa170711..70d382bcf 100644 --- a/src/input_common/gcadapter/gc_adapter.cpp +++ b/src/input_common/gcadapter/gc_adapter.cpp @@ -198,7 +198,7 @@ void Adapter::StartScanThread() { } detect_thread_running = true; - detect_thread = std::thread([=] { ScanThreadFunc(); }); + detect_thread = std::thread(&Adapter::ScanThreadFunc, this); } void Adapter::StopScanThread() { -- cgit v1.2.3