From 046c0c91a3ed665531f20955e7cfb86fe5b73213 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Oct 2020 02:51:14 -0400 Subject: input_common/CMakeLists: Make some warnings errors Makes the input_common code warnings consistent with the rest of the codebase. --- src/input_common/touch_from_button.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/input_common/touch_from_button.cpp') diff --git a/src/input_common/touch_from_button.cpp b/src/input_common/touch_from_button.cpp index 98da0ef1a..c37716aae 100644 --- a/src/input_common/touch_from_button.cpp +++ b/src/input_common/touch_from_button.cpp @@ -11,9 +11,11 @@ namespace InputCommon { class TouchFromButtonDevice final : public Input::TouchDevice { public: TouchFromButtonDevice() { - for (const auto& config_entry : - Settings::values.touch_from_button_maps[Settings::values.touch_from_button_map_index] - .buttons) { + const auto button_index = + static_cast(Settings::values.touch_from_button_map_index); + const auto& buttons = Settings::values.touch_from_button_maps[button_index].buttons; + + for (const auto& config_entry : buttons) { const Common::ParamPackage package{config_entry}; map.emplace_back( Input::CreateDevice(config_entry), -- cgit v1.2.3