aboutsummaryrefslogtreecommitdiff
path: root/src/keycode.cpp
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-12 23:42:00 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-12 23:42:00 +0200
commiteb255e68706c5fcc61bf17a81427c34505c3d519 (patch)
tree74876819d3a01582f9557c5750263c44bf2db614 /src/keycode.cpp
parent72e4c8f5233608924ccd58d178593eb7e69bed17 (diff)
downloadminetest-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.cpp2
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];
}