summaryrefslogtreecommitdiff
path: root/indra/llui/llkeywords.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-07-02 19:09:00 +0300
committerGitHub <noreply@github.com>2024-07-02 19:09:00 +0300
commitb0a6bae5899db218a9851fd168743780716790e6 (patch)
tree9b12d0fc8390fe13fdfea65c308a36a6239a9533 /indra/llui/llkeywords.cpp
parentc19d766812dd744fdd1c91992f92f27794735c79 (diff)
parent14cbf331cbf345bac83606ee5f56c994694420b3 (diff)
Merge pull request #1906 from RyeMutt/reduce-llui-stringtemp
Reduce string temporaries in LLUI part 2
Diffstat (limited to 'indra/llui/llkeywords.cpp')
-rw-r--r--indra/llui/llkeywords.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 5e184b5ddb..ea84594ad6 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -164,13 +164,13 @@ std::string LLKeywords::getArguments(LLSD& arguments)
return argString;
}
-std::string LLKeywords::getAttribute(const std::string& key)
+std::string LLKeywords::getAttribute(std::string_view key)
{
attribute_iterator_t it = mAttributes.find(key);
return (it != mAttributes.end()) ? it->second : "";
}
-LLColor4 LLKeywords::getColorGroup(const std::string& key_in)
+LLColor4 LLKeywords::getColorGroup(std::string_view key_in)
{
std::string color_group = "ScriptText";
if (key_in == "functions")
@@ -261,7 +261,7 @@ void LLKeywords::processTokens()
LL_INFOS("SyntaxLSL") << "Finished processing tokens." << LL_ENDL;
}
-void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group)
+void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
{
LLColor4 color;
LLColor4 color_group;
@@ -333,7 +333,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group
case LLKeywordToken::TT_CONSTANT:
if (getAttribute("type").length() > 0)
{
- color_group = getColorGroup(group + "-" + getAttribute("type"));
+ color_group = getColorGroup(std::string(group) + "-" + getAttribute("type"));
}
else
{