mirror of
https://github.com/deskflow/deskflow.git
synced 2026-07-04 21:04:59 +08:00
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
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user