refactor XDGKeyUtil::mapKeyToKeyID cleanup default case make i in the if and not case the already right type returned

This commit is contained in:
sithlord48 2025-11-13 12:43:12 -05:00 committed by Nick Bolton
parent 4a67694676
commit 281cda1d14

View file

@ -92,9 +92,8 @@ KeyID XDGKeyUtil::mapKeySymToKeyID(KeySym k)
default: { default: {
// lookup character in table // lookup character in table
auto index = s_keySymToUCS4.find(k); if (const auto i = s_keySymToUCS4.find(k); i != s_keySymToUCS4.end()) {
if (index != s_keySymToUCS4.end()) { return i->second;
return static_cast<KeyID>(index->second);
} }
// unknown character // unknown character