From a17d96129fcbf39f7eda7c099416b33561154cd7 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 27 Jun 2021 10:52:40 +0200 Subject: [PATCH] Fix NOLINT line for readability-convert-member-functions-to-static Reverts: acd74cc0e3b514769fb70596aa6bae9605d02c1e --- Source/controls/devices/joystick.cpp | 3 ++- Source/controls/devices/joystick.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/controls/devices/joystick.cpp b/Source/controls/devices/joystick.cpp index d5961a580..b17e06056 100644 --- a/Source/controls/devices/joystick.cpp +++ b/Source/controls/devices/joystick.cpp @@ -178,7 +178,8 @@ int Joystick::ToSdlJoyButton(ControllerButton button) } } -bool Joystick::IsHatButtonPressed(ControllerButton button) +// NOLINTNEXTLINE(readability-convert-member-functions-to-static): Not static if joystick mappings are defined. +bool Joystick::IsHatButtonPressed(ControllerButton button) const { switch (button) { #if defined(JOY_HAT_DPAD_UP_HAT) && defined(JOY_HAT_DPAD_UP) diff --git a/Source/controls/devices/joystick.h b/Source/controls/devices/joystick.h index 06bcb8825..a23333cc2 100644 --- a/Source/controls/devices/joystick.h +++ b/Source/controls/devices/joystick.h @@ -37,8 +37,7 @@ public: private: static int ToSdlJoyButton(ControllerButton button); - // NOLINTNEXTLINE(readability-convert-member-functions-to-static): Not static if joystick mappings are defined. - static bool IsHatButtonPressed(ControllerButton button); + bool IsHatButtonPressed(ControllerButton button) const; SDL_Joystick *sdl_joystick_ = NULL; SDL_JoystickID instance_id_ = -1;