Explorar o código

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.
Lioncash %!s(int64=6) %!d(string=hai) anos
pai
achega
32b6fc4062
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/input_common/gcadapter/gc_adapter.cpp

+ 1 - 1
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() {