Minor fixes

This commit is contained in:
Lynix 2022-04-02 21:18:04 +02:00
parent 71db80c374
commit 5cd9f6fdcd
6 changed files with 13 additions and 13 deletions

View File

@ -44,7 +44,7 @@ namespace Nz
case NetProtocol::Any: case NetProtocol::Any:
m_isUsingDualStack = true; m_isUsingDualStack = true;
// fallthrough [[fallthrough]];
case NetProtocol::IPv6: case NetProtocol::IPv6:
any = IpAddress::AnyIpV6; any = IpAddress::AnyIpV6;
break; break;

View File

@ -49,7 +49,7 @@ namespace Nz
ALint sampleRate; ALint sampleRate;
m_library.alGetBufferi(m_bufferId, AL_FREQUENCY, &sampleRate); m_library.alGetBufferi(m_bufferId, AL_FREQUENCY, &sampleRate);
return SafeCast<UInt64>(sampleRate); return SafeCast<UInt32>(sampleRate);
} }
bool OpenALBuffer::IsCompatibleWith(const AudioDevice& device) const bool OpenALBuffer::IsCompatibleWith(const AudioDevice& device) const

View File

@ -21,7 +21,7 @@ namespace Nz
{ {
number = 0; number = 0;
for (UInt8 mul : { 0x10, 1 }) for (UInt8 mul : { UInt8(0x10), UInt8(1) })
{ {
if (*str >= '0' && *str <= '9') if (*str >= '0' && *str <= '9')
number += (*str - '0') * mul; number += (*str - '0') * mul;

View File

@ -30,7 +30,7 @@ namespace Nz
NazaraAssert(handle != InvalidHandle, "Invalid handle"); NazaraAssert(handle != InvalidHandle, "Invalid handle");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
socklen_t bufferLength = sizeof(sockaddr_in); socklen_t bufferLength = sizeof(sockaddr_in);
@ -314,7 +314,7 @@ namespace Nz
NazaraAssert(handle != InvalidHandle, "Invalid handle"); NazaraAssert(handle != InvalidHandle, "Invalid handle");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
socklen_t bufferLength = sizeof(nameBuffer.size()); socklen_t bufferLength = sizeof(nameBuffer.size());
@ -356,7 +356,7 @@ namespace Nz
NazaraAssert(handle != InvalidHandle, "Invalid handle"); NazaraAssert(handle != InvalidHandle, "Invalid handle");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
socklen_t bufferLength = sizeof(sockaddr_in); socklen_t bufferLength = sizeof(sockaddr_in);
@ -502,7 +502,7 @@ namespace Nz
NazaraAssert(buffer && length > 0, "Invalid buffer"); NazaraAssert(buffer && length > 0, "Invalid buffer");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
socklen_t bufferLength = static_cast<socklen_t>(nameBuffer.size()); socklen_t bufferLength = static_cast<socklen_t>(nameBuffer.size());
@ -575,7 +575,7 @@ namespace Nz
msgHdr.msg_iovlen = static_cast<int>(bufferCount); msgHdr.msg_iovlen = static_cast<int>(bufferCount);
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
if (from) if (from)
{ {

View File

@ -346,7 +346,7 @@ namespace Nz
NazaraAssert(handle != InvalidHandle, "Invalid handle"); NazaraAssert(handle != InvalidHandle, "Invalid handle");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
int bufferLength = static_cast<int>(nameBuffer.size()); int bufferLength = static_cast<int>(nameBuffer.size());
@ -369,7 +369,7 @@ namespace Nz
NazaraAssert(handle != InvalidHandle, "Invalid handle"); NazaraAssert(handle != InvalidHandle, "Invalid handle");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
int bufferLength = static_cast<int>(nameBuffer.size()); int bufferLength = static_cast<int>(nameBuffer.size());
@ -545,7 +545,7 @@ namespace Nz
NazaraAssert(buffer && length > 0, "Invalid buffer"); NazaraAssert(buffer && length > 0, "Invalid buffer");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
int bufferLength = static_cast<int>(nameBuffer.size()); int bufferLength = static_cast<int>(nameBuffer.size());
@ -602,7 +602,7 @@ namespace Nz
NazaraAssert(buffers && bufferCount > 0, "Invalid buffers"); NazaraAssert(buffers && bufferCount > 0, "Invalid buffers");
IpAddressImpl::SockAddrBuffer nameBuffer; IpAddressImpl::SockAddrBuffer nameBuffer;
std::fill(nameBuffer.begin(), nameBuffer.end(), 0); nameBuffer.fill(0);
int bufferLength = static_cast<int>(nameBuffer.size()); int bufferLength = static_cast<int>(nameBuffer.size());

View File

@ -79,7 +79,7 @@ namespace Nz
default: default:
NazaraWarning("Device " + deviceInfo.name + " has handled device type (0x" + NumberToString(physDevice.properties.deviceType, 16) + ')'); NazaraWarning("Device " + deviceInfo.name + " has handled device type (0x" + NumberToString(physDevice.properties.deviceType, 16) + ')');
// fallthrough [[fallthrough]];
case VK_PHYSICAL_DEVICE_TYPE_OTHER: case VK_PHYSICAL_DEVICE_TYPE_OTHER:
deviceInfo.type = RenderDeviceType::Unknown; deviceInfo.type = RenderDeviceType::Unknown;
break; break;