Skip to content
Snippets Groups Projects
Unverified Commit 0e0fc071 authored by Rodrigo Locatti's avatar Rodrigo Locatti Committed by GitHub
Browse files

Merge pull request #5740 from lioncash/const-fn

input_interpreter: Mark two member functions as const
parents fd873fd3 ca9afa32
No related branches found
No related tags found
No related merge requests found
...@@ -100,12 +100,12 @@ public: ...@@ -100,12 +100,12 @@ public:
/** /**
* Checks whether any of the buttons in the parameter list is pressed once. * Checks whether any of the buttons in the parameter list is pressed once.
* *
* @tparam HIDButton The buttons to check. * @tparam T The buttons to check.
* *
* @returns True when at least one of the buttons is pressed once. * @returns True when at least one of the buttons is pressed once.
*/ */
template <HIDButton... T> template <HIDButton... T>
[[nodiscard]] bool IsAnyButtonPressedOnce() { [[nodiscard]] bool IsAnyButtonPressedOnce() const {
return (IsButtonPressedOnce(T) || ...); return (IsButtonPressedOnce(T) || ...);
} }
...@@ -121,12 +121,12 @@ public: ...@@ -121,12 +121,12 @@ public:
/** /**
* Checks whether any of the buttons in the parameter list is held down. * Checks whether any of the buttons in the parameter list is held down.
* *
* @tparam HIDButton The buttons to check. * @tparam T The buttons to check.
* *
* @returns True when at least one of the buttons is held down. * @returns True when at least one of the buttons is held down.
*/ */
template <HIDButton... T> template <HIDButton... T>
[[nodiscard]] bool IsAnyButtonHeld() { [[nodiscard]] bool IsAnyButtonHeld() const {
return (IsButtonHeld(T) || ...); return (IsButtonHeld(T) || ...);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment