1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:47:34 +00:00

KeyboardMapper: Extract method map_from_name

Extract the mapping of a name to a character map into its own method.
This only slightly reduces the number of lines, going from 24 to 17
lines, but makes the code somewhat more readable and reduces repetition.
This commit is contained in:
RasmusNylander 2021-12-15 21:58:46 +01:00 committed by Andreas Kling
parent b2a6c9e5ea
commit a1531dba91
2 changed files with 25 additions and 32 deletions

View file

@ -35,6 +35,7 @@ private:
Vector<KeyButton*> m_keys;
RefPtr<GUI::Widget> m_map_group;
void add_map_radio_button(const StringView map_name, const StringView button_text);
u32* map_from_name(const StringView map_name);
String m_filename;
Keyboard::CharacterMapData m_character_map;