From f7db27344f77c8de8b1a79fb2ee697d65f591b0b Mon Sep 17 00:00:00 2001 From: X512 Date: Sun, 22 Mar 2020 11:29:55 +0900 Subject: [PATCH] Keymap: remove iterator change inside for loop, no functional change Pointed by clang. Change-Id: I3aaad5b1e03385358ccb729251fa31d35108f389 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2392 Reviewed-by: John Scipione Reviewed-by: Alex von Gluck IV --- src/kits/shared/Keymap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kits/shared/Keymap.cpp b/src/kits/shared/Keymap.cpp index 5c86f2667c..9a77e6f602 100644 --- a/src/kits/shared/Keymap.cpp +++ b/src/kits/shared/Keymap.cpp @@ -420,7 +420,7 @@ BKeymap::GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey, // if dead key, we search for our current offset char in the dead key // offset table string comparison is needed - for (int32 i = 0; i < 32; i++) { + for (int32 i = 0; i < 32; i += 2) { if (strncmp(&fChars[offset + 1], &fChars[deadKey[i] + 1], *numBytes) == 0) { *numBytes = fChars[deadKey[i + 1]]; @@ -441,7 +441,6 @@ BKeymap::GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey, } return; } - i++; } // if not found we return the current char mapped