diff options
author | Lioncash <mathew1800@gmail.com> | 2021-01-16 16:04:40 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-01-16 16:08:35 -0500 |
commit | ca9afa329356340a81143ca3fe318a94ba32df81 (patch) | |
tree | c1d3d073d25984d08457cdb820af6f2636a97ecd /src/core/frontend/input_interpreter.h | |
parent | ff2b7cc0d3fbcc2980c027589002ff3ac9e0f3e8 (diff) |
input_interpreter: Mark two member functions as const
These aren't stateful functions, so we can make use of const.
While we're at, we can resolve some -Wdocumentation warnings.
Diffstat (limited to 'src/core/frontend/input_interpreter.h')
-rw-r--r-- | src/core/frontend/input_interpreter.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/frontend/input_interpreter.h b/src/core/frontend/input_interpreter.h index 36a92a6b67..73fc47ffbf 100644 --- a/src/core/frontend/input_interpreter.h +++ b/src/core/frontend/input_interpreter.h @@ -100,12 +100,12 @@ public: /** * 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. */ template <HIDButton... T> - [[nodiscard]] bool IsAnyButtonPressedOnce() { + [[nodiscard]] bool IsAnyButtonPressedOnce() const { return (IsButtonPressedOnce(T) || ...); } @@ -121,12 +121,12 @@ public: /** * 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. */ template <HIDButton... T> - [[nodiscard]] bool IsAnyButtonHeld() { + [[nodiscard]] bool IsAnyButtonHeld() const { return (IsButtonHeld(T) || ...); } |