Split error macro into two versions (format vs non-formating) to allow format checking at compile-time

This commit is contained in:
SirLynix
2023-11-02 15:18:03 +01:00
parent 8fb53f467b
commit 4b8a475bbd
133 changed files with 570 additions and 557 deletions

View File

@@ -40,7 +40,7 @@ namespace Nz
typeMask <<= 1;
}
NazaraError("failed to find a memory type suitable for typeBits: {0} and properties: 0x{1}", typeBits, NumberToString(properties, 16));
NazaraErrorFmt("failed to find a memory type suitable for typeBits: {0} and properties: 0x{1}", typeBits, NumberToString(properties, 16));
return false;
}
@@ -62,7 +62,7 @@ namespace Nz
m_lastErrorCode = m_device->vkFlushMappedMemoryRanges(*m_device, 1, &memoryRange);
if (m_lastErrorCode != VK_SUCCESS)
{
NazaraError("failed to flush memory: {0}", TranslateVulkanError(m_lastErrorCode));
NazaraErrorFmt("failed to flush memory: {0}", TranslateVulkanError(m_lastErrorCode));
return false;
}
@@ -85,7 +85,7 @@ namespace Nz
m_lastErrorCode = m_device->vkMapMemory(*m_device, m_handle, offset, size, flags, &mappedPtr);
if (m_lastErrorCode != VK_SUCCESS)
{
NazaraError("failed to map device memory: {0}", TranslateVulkanError(m_lastErrorCode));
NazaraErrorFmt("failed to map device memory: {0}", TranslateVulkanError(m_lastErrorCode));
return false;
}