summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/PropertiesI.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2009-11-16 20:07:14 +0100
committerJose <jose@zeroc.com>2009-11-16 20:07:14 +0100
commit611373fc278db8b0b6fa2311401b444666becd48 (patch)
tree0537313285e7412ac8f602cf907028ab1e09d45a /cpp/src/Ice/PropertiesI.cpp
parent4363 - test/Ice/stream fails on Windows x64/VC90 (diff)
downloadice-611373fc278db8b0b6fa2311401b444666becd48.tar.bz2
ice-611373fc278db8b0b6fa2311401b444666becd48.tar.xz
ice-611373fc278db8b0b6fa2311401b444666becd48.zip
4367 - Build failures with VC90 64 bit.
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r--cpp/src/Ice/PropertiesI.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index 1973b5ffef4..35b063607bb 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -318,8 +318,8 @@ Ice::PropertiesI::load(const std::string& file)
vector<wchar_t> nameBuf(maxNameSize + 1);
vector<BYTE> dataBuf(maxDataSize);
DWORD keyType;
- DWORD nameBufSize = nameBuf.size();
- DWORD dataBufSize = dataBuf.size();
+ DWORD nameBufSize = static_cast<DWORD>(nameBuf.size());
+ DWORD dataBufSize = static_cast<DWORD>(dataBuf.size());
err = RegEnumValueW(iceKey, i, &nameBuf[0], &nameBufSize, NULL, &keyType, &dataBuf[0], &dataBufSize);
if(err != ERROR_SUCCESS || nameBufSize == 0)
{
@@ -355,11 +355,13 @@ Ice::PropertiesI::load(const std::string& file)
else // keyType == REG_EXPAND_SZ
{
vector<wchar_t> expandedValue(1024);
- DWORD sz = ExpandEnvironmentStringsW(valueW.c_str(), &expandedValue[0], expandedValue.size());
+ DWORD sz = ExpandEnvironmentStringsW(valueW.c_str(), &expandedValue[0],
+ static_cast<DWORD>(expandedValue.size()));
if(sz >= expandedValue.size())
{
expandedValue.resize(sz + 1);
- if(ExpandEnvironmentStringsW(valueW.c_str(), &expandedValue[0], expandedValue.size()) == 0)
+ if(ExpandEnvironmentStringsW(valueW.c_str(), &expandedValue[0],
+ static_cast<DWORD>(expandedValue.size())) == 0)
{
ostringstream os;
os << "could not expand variable in property `" << name << "', key: `" + file + "':\n";
@@ -686,11 +688,11 @@ Ice::PropertiesI::loadConfig()
{
#ifdef _WIN32
vector<wchar_t> v(256);
- DWORD ret = GetEnvironmentVariableW(L"ICE_CONFIG", &v[0], v.size());
+ DWORD ret = GetEnvironmentVariableW(L"ICE_CONFIG", &v[0], static_cast<DWORD>(v.size()));
if(ret >= v.size())
{
v.resize(ret + 1);
- ret = GetEnvironmentVariableW(L"ICE_CONFIG", &v[0], v.size());
+ ret = GetEnvironmentVariableW(L"ICE_CONFIG", &v[0], static_cast<DWORD>(v.size()));
}
if(ret > 0)
{