Explorar o código

input_common/sdl_impl: Make lambda capture more specific in SDLState constructor

We don't need to universally capture by reference. We specifically just
need to capture the this pointer.
Lioncash %!s(int64=7) %!d(string=hai) anos
pai
achega
114060fd87
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/input_common/sdl/sdl_impl.cpp

+ 1 - 1
src/input_common/sdl/sdl_impl.cpp

@@ -475,7 +475,7 @@ SDLState::SDLState() {
 
     initialized = true;
     if (start_thread) {
-        poll_thread = std::thread([&] {
+        poll_thread = std::thread([this] {
             using namespace std::chrono_literals;
             while (initialized) {
                 SDL_PumpEvents();