From 62be0e21df6dc2fb0892f402e7f6cd77ce07cb1a Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 25 Sep 2016 02:53:07 +0200 Subject: [PATCH] Win32: Fix compilation with NAZARA_CORE_WINDOWS_VISTA Former-commit-id: 6249451f41f2dce01652ea61866aa17053ffa4cc [formerly 3db7c2e797fbaa519b303fd533e0184c60781505] [formerly 3342dd5ea892e839757fb3e2e567352c718889de [formerly 174f4491e3141badbce1ded1e4f8e7f2cec2a3d7]] Former-commit-id: d80442b18af96bdecc17bc5409d42483a3a80cd2 [formerly 05adb7a04a120d5989c4307adfdd6f34beef313d] Former-commit-id: bce1c276014724556464f34d2112e6465202cf93 --- src/Nazara/Core/Win32/ConditionVariableImpl.cpp | 2 +- src/Nazara/Network/Win32/IpAddressImpl.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Nazara/Core/Win32/ConditionVariableImpl.cpp b/src/Nazara/Core/Win32/ConditionVariableImpl.cpp index 388a7f587..002a9656a 100644 --- a/src/Nazara/Core/Win32/ConditionVariableImpl.cpp +++ b/src/Nazara/Core/Win32/ConditionVariableImpl.cpp @@ -57,7 +57,7 @@ namespace Nz bool ConditionVariableImpl::Wait(MutexImpl* mutex, UInt32 timeout) { #if NAZARA_CORE_WINDOWS_VISTA - return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout); + return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout) == TRUE; #else m_count++; diff --git a/src/Nazara/Network/Win32/IpAddressImpl.cpp b/src/Nazara/Network/Win32/IpAddressImpl.cpp index 0097227ef..97d7a10e3 100644 --- a/src/Nazara/Network/Win32/IpAddressImpl.cpp +++ b/src/Nazara/Network/Win32/IpAddressImpl.cpp @@ -18,7 +18,7 @@ namespace Nz int GetAddressInfo(const String& hostname, const String& service, const addrinfoImpl* hints, addrinfoImpl** results) { - return GetAddrInfoW(hostname.GetWideString().c_str(), service.GetWideString().c_str(), &hints, &servinfo); + return GetAddrInfoW(hostname.GetWideString().c_str(), service.GetWideString().c_str(), hints, results); } int GetHostnameInfo(sockaddr* socketAddress, socklen_t socketLen, String* hostname, String* service, INT flags) @@ -26,14 +26,14 @@ namespace Nz std::array hostnameBuffer; std::array serviceBuffer; - int result = GetNameInfoW(socketAddress, socketLen, hostnameBuffer.data(), hostnameBuffer.size(), serviceBuffer.data(), serviceBuffer.size(), flags); + int result = GetNameInfoW(socketAddress, socketLen, hostnameBuffer.data(), static_cast(hostnameBuffer.size()), serviceBuffer.data(), static_cast(serviceBuffer.size()), flags); if (result == 0) { if (hostname) - hostname->Set(hostnameBuffer.data()); + *hostname = std::move(String::Unicode(hostnameBuffer.data())); if (service) - service->Set(serviceBuffer.data()); + *service = std::move(String::Unicode(serviceBuffer.data())); } return result;