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: {
// lookup character in table
auto index = s_keySymToUCS4.find(k);
if (index != s_keySymToUCS4.end()) {
return static_cast<KeyID>(index->second);
if (const auto i = s_keySymToUCS4.find(k); i != s_keySymToUCS4.end()) {
return i->second;
}
// unknown character