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:
m_isUsingDualStack = true;
// fallthrough
[[fallthrough]];
case NetProtocol::IPv6:
any = IpAddress::AnyIpV6;
break;

View File

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

View File

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

View File

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

View File

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

View File

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