summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmWIXSourceWriter.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-12-03 18:35:29 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-12-03 18:35:29 (GMT)
commitad0f73573fcc59c7c428ef5e529f8fec6a1cfbe6 (patch)
tree002072cfeff6a68727876077674b50614c9a187d /Source/CPack/WiX/cmWIXSourceWriter.cxx
parent0729ad476c94e2e8918e5fa9718a9173f8199e02 (diff)
downloadCMake-ad0f73573fcc59c7c428ef5e529f8fec6a1cfbe6.zip
CMake-ad0f73573fcc59c7c428ef5e529f8fec6a1cfbe6.tar.gz
CMake-ad0f73573fcc59c7c428ef5e529f8fec6a1cfbe6.tar.bz2
CPack: Fix dashboard warnings (#11575)
Fix int vs. size_t conversion warnings that only showed up in the 64-bit builds.
Diffstat (limited to 'Source/CPack/WiX/cmWIXSourceWriter.cxx')
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index cc00e57..b890ccd 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -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());
}