From 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 13:23:58 +0200 Subject: Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027. --- platform/linuxbsd/key_mapping_x11.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'platform/linuxbsd/key_mapping_x11.cpp') diff --git a/platform/linuxbsd/key_mapping_x11.cpp b/platform/linuxbsd/key_mapping_x11.cpp index 78bd2b71a0..daf7326024 100644 --- a/platform/linuxbsd/key_mapping_x11.cpp +++ b/platform/linuxbsd/key_mapping_x11.cpp @@ -33,7 +33,6 @@ /***** SCAN CODE CONVERSION ******/ struct _XTranslatePair { - KeySym keysym; unsigned int keycode; }; @@ -181,7 +180,6 @@ static _XTranslatePair _xkeysym_to_keycode[] = { }; struct _TranslatePair { - unsigned int keysym; unsigned int keycode; }; @@ -301,10 +299,8 @@ static _TranslatePair _scancode_to_keycode[] = { }; unsigned int KeyMappingX11::get_scancode(unsigned int p_code) { - unsigned int keycode = KEY_UNKNOWN; for (int i = 0; _scancode_to_keycode[i].keysym != KEY_UNKNOWN; i++) { - if (_scancode_to_keycode[i].keycode == p_code) { keycode = _scancode_to_keycode[i].keysym; break; @@ -315,7 +311,6 @@ unsigned int KeyMappingX11::get_scancode(unsigned int p_code) { } unsigned int KeyMappingX11::get_keycode(KeySym p_keysym) { - // kinda bruteforce.. could optimize. if (p_keysym < 0x100) // Latin 1, maps 1-1 @@ -323,7 +318,6 @@ unsigned int KeyMappingX11::get_keycode(KeySym p_keysym) { // look for special key for (int idx = 0; _xkeysym_to_keycode[idx].keysym != 0; idx++) { - if (_xkeysym_to_keycode[idx].keysym == p_keysym) return _xkeysym_to_keycode[idx].keycode; } @@ -332,7 +326,6 @@ unsigned int KeyMappingX11::get_keycode(KeySym p_keysym) { } KeySym KeyMappingX11::get_keysym(unsigned int p_code) { - // kinda bruteforce.. could optimize. if (p_code < 0x100) // Latin 1, maps 1-1 @@ -340,7 +333,6 @@ KeySym KeyMappingX11::get_keysym(unsigned int p_code) { // look for special key for (int idx = 0; _xkeysym_to_keycode[idx].keysym != 0; idx++) { - if (_xkeysym_to_keycode[idx].keycode == p_code) return _xkeysym_to_keycode[idx].keysym; } @@ -353,7 +345,6 @@ KeySym KeyMappingX11::get_keysym(unsigned int p_code) { // Tables taken from FOX toolkit struct _XTranslateUnicodePair { - KeySym keysym; unsigned int unicode; }; @@ -1125,7 +1116,6 @@ static _XTranslateUnicodePair _xkeysym_to_unicode[_KEYSYM_MAX] = { }; unsigned int KeyMappingX11::get_unicode_from_keysym(KeySym p_keysym) { - /* Latin-1 */ if (p_keysym >= 0x20 && p_keysym <= 0x7e) return p_keysym; @@ -1155,7 +1145,6 @@ unsigned int KeyMappingX11::get_unicode_from_keysym(KeySym p_keysym) { } struct _XTranslateUnicodePairReverse { - unsigned int unicode; KeySym keysym; }; @@ -1919,7 +1908,6 @@ static _XTranslateUnicodePairReverse _unicode_to_xkeysym[_UNICODE_MAX] = { }; KeySym KeyMappingX11::get_keysym_from_unicode(unsigned int p_unicode) { - /* Latin 1 */ if (p_unicode >= 0x20 && p_unicode <= 0x7e) -- cgit v1.2.3