summaryrefslogtreecommitdiff
path: root/indra/llui/lltextparser.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-01 15:49:26 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-01 15:49:26 +0200
commitb42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 (patch)
treed73404c2fbacce379a57e2d03a6cd54558590859 /indra/llui/lltextparser.cpp
parentcb3bd8865aa0f9fb8a247ea595cf1973057ba91f (diff)
Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings
Diffstat (limited to 'indra/llui/lltextparser.cpp')
-rw-r--r--indra/llui/lltextparser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index 8e2bfe6ac2..6a867fc759 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);
+ auto pos = ltext.rfind(pattern);
if (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)
{