{x11,wayland}_common: convert dead code to static sanity check

This commit is contained in:
Kacper Michajłow
2025-03-06 21:58:38 +01:00
parent dd107a1a39
commit 41d03dca2a
2 changed files with 6 additions and 8 deletions
+3 -4
View File
@@ -2423,11 +2423,10 @@ static int lookupkey(int key)
mpkey = lookup_keymap_table(keymap, key);
// XFree86 keysym range; typically contains obscure "extra" keys
if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF) {
static_assert(MP_KEY_UNKNOWN_RESERVED_START + (0x1008FFFF - 0x10080000) <=
MP_KEY_UNKNOWN_RESERVED_LAST, "");
if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF)
mpkey = MP_KEY_UNKNOWN_RESERVED_START + (key - 0x10080000);
if (mpkey > MP_KEY_UNKNOWN_RESERVED_LAST)
mpkey = 0;
}
return mpkey;
}
+3 -4
View File
@@ -831,11 +831,10 @@ static int vo_x11_lookupkey(int key)
mpkey = lookup_keymap_table(keymap, key);
// XFree86 keysym range; typically contains obscure "extra" keys
if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF) {
static_assert(MP_KEY_UNKNOWN_RESERVED_START + (0x1008FFFF - 0x10080000) <=
MP_KEY_UNKNOWN_RESERVED_LAST, "");
if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF)
mpkey = MP_KEY_UNKNOWN_RESERVED_START + (key - 0x10080000);
if (mpkey > MP_KEY_UNKNOWN_RESERVED_LAST)
mpkey = 0;
}
return mpkey;
}