Prevent unnecessary string copies
parent
6e7e60b854
commit
0647597e8e
|
|
@ -456,6 +456,7 @@ template<class T> std::string LLStringUtilBase<T>::sLocale;
|
|||
typedef LLStringUtilBase<char> LLStringUtil;
|
||||
typedef LLStringUtilBase<llwchar> LLWStringUtil;
|
||||
typedef std::basic_string<llwchar> LLWString;
|
||||
typedef std::basic_string_view<llwchar> 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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace FSCommon
|
|||
|
||||
LLUUID getGroupForRezzing();
|
||||
|
||||
void updateUsedEmojis(LLWString text);
|
||||
void updateUsedEmojis(LLWStringView text);
|
||||
};
|
||||
|
||||
#endif // FS_COMMON_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue