From b1e0b7728bc0933f17509b8bfbc48f218f9990dc Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 13 Aug 2011 07:31:46 +0200 Subject: [PATCH] Fix keycode_to_keyname return value --- src/keycode.cpp | 2 +- src/keycode.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/keycode.cpp b/src/keycode.cpp index 323d12e74..052cd7dc6 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 2681e7efa..e64cb362c 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);