diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-01 15:49:26 +0200 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-01 15:49:26 +0200 |
commit | b42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 (patch) | |
tree | d73404c2fbacce379a57e2d03a6cd54558590859 /indra/newview/llfloaterimnearbychat.cpp | |
parent | cb3bd8865aa0f9fb8a247ea595cf1973057ba91f (diff) |
Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings
Diffstat (limited to 'indra/newview/llfloaterimnearbychat.cpp')
-rw-r--r-- | indra/newview/llfloaterimnearbychat.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 26b0836301..28c651f0cd 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -431,7 +431,7 @@ bool LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) bool LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std::string* out_str) { - U32 in_len = in_str.length(); + auto in_len = in_str.length(); S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); bool string_was_found = false; @@ -470,7 +470,7 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke() // to eat trailing spaces that might be part of a gesture. LLWStringUtil::trimHead(raw_text); - S32 length = raw_text.length(); + auto length = raw_text.length(); if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences { @@ -517,7 +517,7 @@ void LLFloaterIMNearbyChat::onChatBoxKeystroke() mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part // Select to end of line, starting from the character // after the last one the user typed. - mInputEditor->selectByCursorPosition(utf8_out_str.size()-rest_of_match.size(),utf8_out_str.size()); + mInputEditor->selectByCursorPosition(static_cast<S32>(utf8_out_str.size() - rest_of_match.size()), static_cast<S32>(utf8_out_str.size())); } } @@ -549,7 +549,7 @@ void LLFloaterIMNearbyChat::onChatBoxFocusReceived() EChatType LLFloaterIMNearbyChat::processChatTypeTriggers(EChatType type, std::string &str) { - U32 length = str.length(); + auto length = str.length(); S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); for (S32 n = 0; n < cnt; n++) @@ -560,7 +560,7 @@ EChatType LLFloaterIMNearbyChat::processChatTypeTriggers(EChatType type, std::st if (!LLStringUtil::compareInsensitive(trigger, sChatTypeTriggers[n].name)) { - U32 trigger_length = sChatTypeTriggers[n].name.length(); + auto trigger_length = sChatTypeTriggers[n].name.length(); // It's to remove space after trigger name if (length > trigger_length && str[trigger_length] == ' ') @@ -754,8 +754,8 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType bool LLFloaterIMNearbyChat::isWordsName(const std::string& name) { // checking to see if it's display name plus username in parentheses - S32 open_paren = name.find(" (", 0); - S32 close_paren = name.find(')', 0); + auto open_paren = name.find(" (", 0); + auto close_paren = name.find(')', 0); if (open_paren != std::string::npos && close_paren == name.length()-1) @@ -765,7 +765,7 @@ bool LLFloaterIMNearbyChat::isWordsName(const std::string& name) else { //checking for a single space - S32 pos = name.find(' ', 0); + auto pos = name.find(' ', 0); return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos; } } |