Ver Fonte

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 há 7 anos atrás
pai
commit
114060fd87
1 ficheiros alterados com 1 adições e 1 exclusões
  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;
     initialized = true;
     if (start_thread) {
     if (start_thread) {
-        poll_thread = std::thread([&] {
+        poll_thread = std::thread([this] {
             using namespace std::chrono_literals;
             using namespace std::chrono_literals;
             while (initialized) {
             while (initialized) {
                 SDL_PumpEvents();
                 SDL_PumpEvents();