From ca77be3ac24b342b31261dc6b2459d2e4fd70be6 Mon Sep 17 00:00:00 2001 From: B3n30 Date: Tue, 9 Oct 2018 22:44:26 +0200 Subject: [PATCH] remove std::tie in sdl_impl --- src/input_common/sdl/sdl_impl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index 44be6e3c5..a7db56f43 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -328,9 +328,7 @@ public: : joystick(std::move(joystick_)), axis_x(axis_x_), axis_y(axis_y_), deadzone(deadzone_) {} std::tuple GetStatus() const override { - float x; - float y; - std::tie(x, y) = joystick->GetAnalog(axis_x, axis_y); + const auto [x, y] = joystick->GetAnalog(axis_x, axis_y); const float r = std::sqrt((x * x) + (y * y)); if (r > deadzone) { return std::make_tuple(x / r * (r - deadzone) / (1 - deadzone),