diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-08-12 23:42:00 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-08-12 23:42:00 +0200 |
commit | eb255e68706c5fcc61bf17a81427c34505c3d519 (patch) | |
tree | 74876819d3a01582f9557c5750263c44bf2db614 /src/keycode.cpp | |
parent | 72e4c8f5233608924ccd58d178593eb7e69bed17 (diff) | |
download | minetest-eb255e68706c5fcc61bf17a81427c34505c3d519.tar.gz minetest-eb255e68706c5fcc61bf17a81427c34505c3d519.tar.bz2 minetest-eb255e68706c5fcc61bf17a81427c34505c3d519.zip |
Clean up key names handling
Constify keycode and move the static array of localizable names from the
guiKeyChangeMenu header to the implementation file, changing its name.
Diffstat (limited to 'src/keycode.cpp')
-rw-r--r-- | src/keycode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/keycode.cpp b/src/keycode.cpp index f014914d0..323d12e74 100644 --- a/src/keycode.cpp +++ b/src/keycode.cpp @@ -206,7 +206,7 @@ static const char *KeyNames[] = "-", "-", "-", "-", "-", "-", "-", "-", "Attn", "CrSel", "ExSel", "Erase OEF", "Play", "Zoom", "PA1", "OEM Clear", "-" }; -std::string keycode_to_keyname(s32 keycode) +const std::string &keycode_to_keyname(s32 keycode) { return KeyNames[keycode]; } |