diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-24 03:25:28 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-24 13:55:38 +0300 |
commit | 2696b3de088877c3a406e817ed232c252700a16c (patch) | |
tree | f58753bc008245c035813ddf05806bc0366a6ed9 /indra/newview | |
parent | 6377610f6587989c126b00f490dfc8d527a1c2ce (diff) |
Introduce LLWStringView to prevent unnecessary memory allocations
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 81a4f9936c..a0b56b14f0 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -587,13 +587,13 @@ void LLFloaterIMSessionTab::appendMessage(const LLChat& chat, const LLSD& args) mChatHistory->appendMessage(chat, chat_args); } -void LLFloaterIMSessionTab::updateUsedEmojis(LLWString text) +void LLFloaterIMSessionTab::updateUsedEmojis(LLWStringView text) { LLEmojiDictionary* dictionary = LLEmojiDictionary::getInstance(); llassert_always(dictionary); bool emojiSent = false; - for (llwchar& c : text) + for (const llwchar& c : text) { if (dictionary->isEmoji(c)) { diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index f1773520af..0a8502cfc5 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -147,7 +147,7 @@ protected: std::string appendTime(); void assignResizeLimits(); - void updateUsedEmojis(LLWString text); + void updateUsedEmojis(LLWStringView text); S32 mFloaterExtraWidth; |