diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-01 22:50:39 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-07-01 22:50:39 -0400 |
commit | 3fa6db9603a020402eea8c61622b0cab27dbcca3 (patch) | |
tree | 67729f34cb6230cff774469e8597eab945bca122 /indra/llwindow | |
parent | 0460d9a5e84599316e505ae25b3f9a8148adb3fa (diff) |
Reduce string temporaries from LLTrans
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llkeyboard.cpp | 4 | ||||
-rw-r--r-- | indra/llwindow/llkeyboard.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index 4f29fb0b0a..33eebdadd1 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -359,7 +359,7 @@ std::string LLKeyboard::stringFromKey(KEY key, bool translate) LLKeyStringTranslatorFunc *trans = gKeyboard->mStringTranslator; if (trans != NULL) { - res = trans(res.c_str()); + res = trans(res); } } @@ -399,7 +399,7 @@ std::string LLKeyboard::stringFromMouse(EMouseClickType click, bool translate) LLKeyStringTranslatorFunc* trans = gKeyboard->mStringTranslator; if (trans != NULL) { - res = trans(res.c_str()); + res = trans(res); } } return res; diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index 7f8d0af155..713eb7aec2 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -42,7 +42,7 @@ enum EKeystate }; typedef boost::function<bool(EKeystate keystate)> LLKeyFunc; -typedef std::string (LLKeyStringTranslatorFunc)(const char *label); +typedef std::string (LLKeyStringTranslatorFunc)(std::string_view); enum EKeyboardInsertMode { |