From: Giuseppe Bilotta Date: Sat, 13 Aug 2011 05:31:46 +0000 (+0200) Subject: Fix keycode_to_keyname return value X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=b1e0b7728bc0933f17509b8bfbc48f218f9990dc;p=zefram%2Fminetest%2Fminetest_engine.git Fix keycode_to_keyname return value --- diff --git a/src/keycode.cpp b/src/keycode.cpp index 323d12e7..052cd7dc 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", "-" }; -const std::string &keycode_to_keyname(s32 keycode) +const char *keycode_to_keyname(s32 keycode) { return KeyNames[keycode]; } diff --git a/src/keycode.h b/src/keycode.h index 2681e7ef..e64cb362 100644 --- a/src/keycode.h +++ b/src/keycode.h @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include irr::EKEY_CODE keyname_to_keycode(const char *name); -const std::string &keycode_to_keyname(s32 keycode); +const char *keycode_to_keyname(s32 keycode); // Key configuration getter irr::EKEY_CODE getKeySetting(const char *settingname);