Commit ad0f7357 authored by David Cole's avatar David Cole

CPack: Fix dashboard warnings (#11575)

Fix int vs. size_t conversion warnings that only showed up in
the 64-bit builds.
parent 0729ad47
......@@ -115,7 +115,7 @@ std::string cmWIXSourceWriter::WindowsCodepageToUtf8(const std::string& value)
}
int characterCount = MultiByteToWideChar(
CP_ACP, 0, value.c_str(), value.size(), 0, 0);
CP_ACP, 0, value.c_str(), static_cast<int>(value.size()), 0, 0);
if(characterCount == 0)
{
......@@ -125,10 +125,11 @@ std::string cmWIXSourceWriter::WindowsCodepageToUtf8(const std::string& value)
std::vector<wchar_t> utf16(characterCount);
MultiByteToWideChar(
CP_ACP, 0, value.c_str(), value.size(), &utf16[0], utf16.size());
CP_ACP, 0, value.c_str(), static_cast<int>(value.size()),
&utf16[0], static_cast<int>(utf16.size()));
int utf8ByteCount =
WideCharToMultiByte(CP_UTF8, 0, &utf16[0], utf16.size(), 0, 0, 0, 0);
int utf8ByteCount = WideCharToMultiByte(
CP_UTF8, 0, &utf16[0], static_cast<int>(utf16.size()), 0, 0, 0, 0);
if(utf8ByteCount == 0)
{
......@@ -137,8 +138,8 @@ std::string cmWIXSourceWriter::WindowsCodepageToUtf8(const std::string& value)
std::vector<char> utf8(utf8ByteCount);
WideCharToMultiByte(CP_UTF8, 0, &utf16[0], utf16.size(),
&utf8[0], utf8.size(), 0, 0);
WideCharToMultiByte(CP_UTF8, 0, &utf16[0], static_cast<int>(utf16.size()),
&utf8[0], static_cast<int>(utf8.size()), 0, 0);
return std::string(&utf8[0], utf8.size());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment