summaryrefslogtreecommitdiff
path: root/src/core/frontend/input_interpreter.h
diff options
context:
space:
mode:
authorGravatar Lioncash2021-01-16 16:04:40 -0500
committerGravatar Lioncash2021-01-16 16:08:35 -0500
commitca9afa329356340a81143ca3fe318a94ba32df81 (patch)
treec1d3d073d25984d08457cdb820af6f2636a97ecd /src/core/frontend/input_interpreter.h
parentMerge pull request #5366 from Morph1984/button-press (diff)
downloadyuzu-ca9afa329356340a81143ca3fe318a94ba32df81.tar.gz
yuzu-ca9afa329356340a81143ca3fe318a94ba32df81.tar.xz
yuzu-ca9afa329356340a81143ca3fe318a94ba32df81.zip
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.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/frontend/input_interpreter.h b/src/core/frontend/input_interpreter.h
index 36a92a6b6..73fc47ffb 100644
--- a/src/core/frontend/input_interpreter.h
+++ b/src/core/frontend/input_interpreter.h
@@ -100,12 +100,12 @@ public:
100 /** 100 /**
101 * Checks whether any of the buttons in the parameter list is pressed once. 101 * Checks whether any of the buttons in the parameter list is pressed once.
102 * 102 *
103 * @tparam HIDButton The buttons to check. 103 * @tparam T The buttons to check.
104 * 104 *
105 * @returns True when at least one of the buttons is pressed once. 105 * @returns True when at least one of the buttons is pressed once.
106 */ 106 */
107 template <HIDButton... T> 107 template <HIDButton... T>
108 [[nodiscard]] bool IsAnyButtonPressedOnce() { 108 [[nodiscard]] bool IsAnyButtonPressedOnce() const {
109 return (IsButtonPressedOnce(T) || ...); 109 return (IsButtonPressedOnce(T) || ...);
110 } 110 }
111 111
@@ -121,12 +121,12 @@ public:
121 /** 121 /**
122 * Checks whether any of the buttons in the parameter list is held down. 122 * Checks whether any of the buttons in the parameter list is held down.
123 * 123 *
124 * @tparam HIDButton The buttons to check. 124 * @tparam T The buttons to check.
125 * 125 *
126 * @returns True when at least one of the buttons is held down. 126 * @returns True when at least one of the buttons is held down.
127 */ 127 */
128 template <HIDButton... T> 128 template <HIDButton... T>
129 [[nodiscard]] bool IsAnyButtonHeld() { 129 [[nodiscard]] bool IsAnyButtonHeld() const {
130 return (IsButtonHeld(T) || ...); 130 return (IsButtonHeld(T) || ...);
131 } 131 }
132 132