summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-29 13:25:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-09-29 13:25:56 +0200
commit830db20afba8895f68a0b4198657b08735635e28 (patch)
tree8e09048dab97418be477ec7dbb56814ef2e25955 /setup_native
parent0439ccc3c3cac6d8c1d6fe5943998bf4ba82b6df (diff)
Fix syntax errors
...that are apparently accepted by MSVC, but not by clang-cl Change-Id: I2a11bdc709b9711d9d93d24dcb5957121fcf9efb
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
index 4d78d7dc5e08..76de7a7559f0 100644
--- a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
@@ -40,7 +40,7 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle )
{
if ( ERROR_SUCCESS == RegQueryValueExW( hKey, L"INSTALLLOCATION", nullptr, nullptr, reinterpret_cast<LPBYTE>(szValue), &nValueSize ) )
{
- szValue[std::min(unsigned int(SAL_N_ELEMENTS(szValue) - 1), unsigned int(nValueSize / sizeof(*szValue)))] = 0;
+ szValue[std::min(static_cast<unsigned int>(SAL_N_ELEMENTS(szValue) - 1), static_cast<unsigned int>(nValueSize / sizeof(*szValue)))] = 0;
sInstDir = szValue;
MsiSetPropertyW(handle, L"INSTALLLOCATION", sInstDir.c_str());
// MessageBoxW( NULL, sInstDir.c_str(), L"Found in HKEY_CURRENT_USER", MB_OK );
@@ -52,7 +52,7 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle )
{
if ( ERROR_SUCCESS == RegQueryValueExW( hKey, L"INSTALLLOCATION", nullptr, nullptr, reinterpret_cast<LPBYTE>(szValue), &nValueSize ) )
{
- szValue[std::min(unsigned int(SAL_N_ELEMENTS(szValue) - 1), unsigned int(nValueSize / sizeof(*szValue)))] = 0;
+ szValue[std::min(static_cast<unsigned int>(SAL_N_ELEMENTS(szValue) - 1), static_cast<unsigned int>(nValueSize / sizeof(*szValue)))] = 0;
sInstDir = szValue;
MsiSetPropertyW(handle, L"INSTALLLOCATION", sInstDir.c_str());
// MessageBoxW( NULL, sInstDir.c_str(), L"Found in HKEY_LOCAL_MACHINE", MB_OK );