summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-06-09 00:48:45 +0300
committerGitHub <noreply@github.com>2024-06-09 00:48:45 +0300
commit22d3ea34f29bc11f3e5bfe491f4bc0895e1d4653 (patch)
tree6c8e4f460f9d0ab2684e21a63f9ecd921eb45024 /indra/llwindow
parent69b48fd13adb129bfa56eaf81309e10eaa16a023 (diff)
parent395c1c6adf1ecb669f805d5244772b080c077cce (diff)
Merge pull request #1613 from Ansariel/DRTVWR-600-maint-A
Fix/re-enable MSVC compiler warnings
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowwin32.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 92702b3ffa..c57258fbce 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3625,13 +3625,13 @@ void LLSplashScreenWin32::updateImpl(const std::string& mesg)
{
if (!mWindow) return;
- int output_str_len = MultiByteToWideChar(CP_UTF8, 0, mesg.c_str(), mesg.length(), NULL, 0);
+ int output_str_len = MultiByteToWideChar(CP_UTF8, 0, mesg.c_str(), static_cast<int>(mesg.length()), NULL, 0);
if( output_str_len>1024 )
return;
WCHAR w_mesg[1025];//big enought to keep null terminatos
- MultiByteToWideChar (CP_UTF8, 0, mesg.c_str(), mesg.length(), w_mesg, output_str_len);
+ MultiByteToWideChar (CP_UTF8, 0, mesg.c_str(), static_cast<int>(mesg.length()), w_mesg, output_str_len);
//looks like MultiByteToWideChar didn't add null terminator to converted string, see EXT-4858
w_mesg[output_str_len] = 0;
@@ -4025,14 +4025,14 @@ U32 LLWindowWin32::fillReconvertString(const LLWString &text,
S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string)
{
const llutf16string text_utf16 = wstring_to_utf16str(text);
- const DWORD required_size = sizeof(RECONVERTSTRING) + (text_utf16.length() + 1) * sizeof(WCHAR);
+ const DWORD required_size = sizeof(RECONVERTSTRING) + (static_cast<DWORD>(text_utf16.length()) + 1) * sizeof(WCHAR);
if (reconvert_string && reconvert_string->dwSize >= required_size)
{
const DWORD focus_utf16_at = wstring_utf16_length(text, 0, focus);
const DWORD focus_utf16_length = wstring_utf16_length(text, focus, focus_length);
reconvert_string->dwVersion = 0;
- reconvert_string->dwStrLen = text_utf16.length();
+ reconvert_string->dwStrLen = static_cast<DWORD>(text_utf16.length());
reconvert_string->dwStrOffset = sizeof(RECONVERTSTRING);
reconvert_string->dwCompStrLen = focus_utf16_length;
reconvert_string->dwCompStrOffset = focus_utf16_at * sizeof(WCHAR);
@@ -4195,7 +4195,7 @@ void LLWindowWin32::handleCompositionMessage(const U32 indexes)
}
}
- S32 caret_position = preedit_string.length();
+ S32 caret_position = static_cast<S32>(preedit_string.length());
if (indexes & GCS_CURSORPOS)
{
const S32 caret_position_utf16 = LLWinImm::getCompositionString(himc, GCS_CURSORPOS, NULL, 0);
@@ -4241,7 +4241,7 @@ void LLWindowWin32::handleCompositionMessage(const U32 indexes)
{
if (preedit_segment_lengths.size() == 0)
{
- preedit_segment_lengths.assign(1, preedit_string.length());
+ preedit_segment_lengths.assign(1, static_cast<S32>(preedit_string.length()));
}
if (preedit_standouts.size() == 0)
{