refactor XDGKeyUtil::mapKeyToKeyID cleanup default case make i in the if and not case the already right type returned
This commit is contained in:
parent
4a67694676
commit
281cda1d14
1 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue