diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index e87f8feddf..eb706aea21 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -456,6 +456,7 @@ template std::string LLStringUtilBase::sLocale; typedef LLStringUtilBase LLStringUtil; typedef LLStringUtilBase LLWStringUtil; typedef std::basic_string LLWString; +typedef std::basic_string_view LLWStringView; //@ Use this where we want to disallow input in the form of "foo" // This is used to catch places where english text is embedded in the code diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index 4f0d4a2487..cd81ad04e3 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -505,7 +505,7 @@ bool FSCommon::isFilterEditorKeyCombo(KEY key, MASK mask) LLUUID FSCommon::getGroupForRezzing() { - LLUUID group_id = gAgent.getGroupID(); + LLUUID group_id{ gAgent.getGroupID() }; LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (parcel && gSavedSettings.getBOOL("RezUnderLandGroup")) @@ -523,12 +523,12 @@ LLUUID FSCommon::getGroupForRezzing() return group_id; } -void FSCommon::updateUsedEmojis(LLWString text) +void FSCommon::updateUsedEmojis(LLWStringView text) { LLEmojiDictionary* dictionary = LLEmojiDictionary::getInstance(); - bool emojiSent = false; - for (llwchar& c : text) + bool emojiSent{ false }; + for (const llwchar& c : text) { if (dictionary->isEmoji(c)) { diff --git a/indra/newview/fscommon.h b/indra/newview/fscommon.h index 2cd77627a9..2e7946b0e5 100644 --- a/indra/newview/fscommon.h +++ b/indra/newview/fscommon.h @@ -94,7 +94,7 @@ namespace FSCommon LLUUID getGroupForRezzing(); - void updateUsedEmojis(LLWString text); + void updateUsedEmojis(LLWStringView text); }; #endif // FS_COMMON_H