summaryrefslogtreecommitdiff
path: root/indra/llui/lltextparser.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-06-12 14:33:01 -0700
committerGitHub <noreply@github.com>2024-06-12 14:33:01 -0700
commit071e464155a670a9a7e836ec52049fc80b507995 (patch)
treee129794d3f4c29c92d6515cbdbe6898ee8aa558b /indra/llui/lltextparser.cpp
parentf0de2ba6340e0d540aa70ac0086defde52cf60af (diff)
parent8444cd9562a6a7b755fcb075864e205122354192 (diff)
Merge pull request #1723 from secondlife/brad/maint-a-merge-to-gltf-dev
maint a merge to gltf dev
Diffstat (limited to 'indra/llui/lltextparser.cpp')
-rw-r--r--indra/llui/lltextparser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index 8e2bfe6ac2..097b168106 100644
--- a/indra/llui/lltextparser.cpp
+++ b/indra/llui/lltextparser.cpp
@@ -73,11 +73,11 @@ S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
found = (! ltext.find(pattern) ? 0 : std::string::npos);
break;
case ENDS_WITH:
- S32 pos = ltext.rfind(pattern);
- if (pos >= 0 && (ltext.length()-pattern.length()==pos)) found = pos;
+ auto pos = ltext.rfind(pattern);
+ if (pos != std::string::npos && pos >= 0 && (ltext.length() - pattern.length() == pos)) found = pos;
break;
}
- return found;
+ return static_cast<S32>(found);
}
LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLColor4 &color, EHighlightPosition part, S32 index)
@@ -99,8 +99,8 @@ LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLC
S32 start = findPattern(text,mHighlights[i]);
if (start >= 0 )
{
- S32 end = std::string(mHighlights[i]["pattern"]).length();
- S32 len = text.length();
+ auto end = std::string(mHighlights[i]["pattern"]).length();
+ auto len = text.length();
EHighlightPosition newpart;
if (start==0)
{