From 9ec01bc515164a55a6bdcfadf5c3ed5320b94125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sat, 25 Feb 2017 23:41:01 +0100 Subject: [PATCH] Remove the unused prevKeyStates argument from hasKeyPressed() --- right/src/action.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/right/src/action.c b/right/src/action.c index fc269db..09b09df 100644 --- a/right/src/action.c +++ b/right/src/action.c @@ -56,7 +56,7 @@ static bool hasKeyPressed(const uint8_t *prevKeyStates, const uint8_t *currKeySt return (!prevKeyStates[keyId]) && currKeyStates[keyId]; } -static bool isKeyPressed(const uint8_t *prevKeyStates, const uint8_t *currKeyStates, uint8_t keyId) +static bool isKeyPressed(const uint8_t *currKeyStates, uint8_t keyId) { return currKeyStates[keyId]; } @@ -69,7 +69,7 @@ static bool hasKeyReleased(const uint8_t *prevKeyStates, const uint8_t *currKeyS static bool handleKey(key_action_t key, int scancodeIdx, usb_keyboard_report_t *report, const uint8_t *prevKeyStates, const uint8_t *currKeyStates, uint8_t keyId) { switch (key.type) { case KEY_ACTION_KEYSTROKE: - if (isKeyPressed(prevKeyStates, currKeyStates, keyId)) { + if (isKeyPressed(currKeyStates, keyId)) { return pressKey(key, scancodeIdx, report); } break; @@ -96,7 +96,7 @@ static bool wasPreviousMouseActionWheelAction = false; void HandleMouseKey(usb_mouse_report_t *report, key_action_t key, const uint8_t *prevKeyStates, const uint8_t *currKeyStates, uint8_t keyId) { - if (!isKeyPressed(prevKeyStates, currKeyStates, keyId)) { + if (!isKeyPressed(currKeyStates, keyId)) { return; }