summaryrefslogtreecommitdiff
path: root/indra/newview/llgesturemgr.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/newview/llgesturemgr.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/newview/llgesturemgr.cpp')
-rw-r--r--indra/newview/llgesturemgr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 2ac99a2f16..8ee11cdbd2 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -671,7 +671,7 @@ bool LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::strin
{
// choose one at random
{
- S32 random = ll_rand(matching.size());
+ S32 random = ll_rand(static_cast<S32>(matching.size()));
gesture = matching[random];
@@ -745,7 +745,7 @@ bool LLGestureMgr::triggerGesture(KEY key, MASK mask)
// choose one and play it
if (matching.size() > 0)
{
- U32 random = ll_rand(matching.size());
+ U32 random = ll_rand(static_cast<S32>(matching.size()));
LLMultiGesture* gesture = matching[random];
@@ -783,7 +783,7 @@ bool LLGestureMgr::triggerGestureRelease(KEY key, MASK mask)
S32 LLGestureMgr::getPlayingCount() const
{
- return mPlaying.size();
+ return static_cast<S32>(mPlaying.size());
}
@@ -1462,7 +1462,7 @@ void LLGestureMgr::notifyObservers()
bool LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
{
- S32 in_len = in_str.length();
+ auto in_len = in_str.length();
//return whole trigger, if received text equals to it
item_map_t::iterator it;
@@ -1490,7 +1490,7 @@ bool LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
{
const std::string& trigger = gesture->getTrigger();
- if (in_len > (S32)trigger.length())
+ if (in_len > trigger.length())
{
// too short, bail out
continue;