summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstring.cpp
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/llcommon/llstring.cpp
parent69b48fd13adb129bfa56eaf81309e10eaa16a023 (diff)
parent395c1c6adf1ecb669f805d5244772b080c077cce (diff)
Merge pull request #1613 from Ansariel/DRTVWR-600-maint-A
Fix/re-enable MSVC compiler warnings
Diffstat (limited to 'indra/llcommon/llstring.cpp')
-rw-r--r--indra/llcommon/llstring.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 5df0f8702d..514d73b24b 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -809,7 +809,7 @@ std::string ll_convert_wide_to_string(const wchar_t* in, size_t len_in, unsigned
code_page,
0,
in,
- len_in,
+ static_cast<int>(len_in),
NULL,
0,
0,
@@ -824,7 +824,7 @@ std::string ll_convert_wide_to_string(const wchar_t* in, size_t len_in, unsigned
code_page,
0,
in,
- len_in,
+ static_cast<int>(len_in),
pout,
len_out,
0,
@@ -851,8 +851,8 @@ std::wstring ll_convert_string_to_wide(const char* in, size_t len, unsigned int
std::vector<wchar_t> w_out(len + 1);
memset(&w_out[0], 0, w_out.size());
- int real_output_str_len = MultiByteToWideChar(code_page, 0, in, len,
- &w_out[0], w_out.size() - 1);
+ int real_output_str_len = MultiByteToWideChar(code_page, 0, in, static_cast<int>(len),
+ &w_out[0], static_cast<int>(w_out.size() - 1));
//looks like MultiByteToWideChar didn't add null terminator to converted string, see EXT-4858.
w_out[real_output_str_len] = 0;
@@ -943,7 +943,7 @@ std::optional<std::wstring> llstring_getoptenv(const std::string& key)
auto wkey = ll_convert_string_to_wide(key);
// Take a wild guess as to how big the buffer should be.
std::vector<wchar_t> buffer(1024);
- auto n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], buffer.size());
+ auto n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], static_cast<DWORD>(buffer.size()));
// If our initial guess was too short, n will indicate the size (in
// wchar_t's) that buffer should have been, including the terminating nul.
if (n > (buffer.size() - 1))
@@ -951,7 +951,7 @@ std::optional<std::wstring> llstring_getoptenv(const std::string& key)
// make it big enough
buffer.resize(n);
// and try again
- n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], buffer.size());
+ n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], static_cast<DWORD>(buffer.size()));
}
// did that (ultimately) succeed?
if (n)