Misc: Replace log printf calls with fmt

This commit is contained in:
Stenzek
2024-05-23 20:20:16 +10:00
parent 49b2e76dea
commit b6d019db66
117 changed files with 1585 additions and 1615 deletions

View File

@ -27,7 +27,7 @@ bool MetalStreamBuffer::Create(id<MTLDevice> device, u32 size)
id<MTLBuffer> new_buffer = [device newBufferWithLength:size options:options];
if (new_buffer == nil)
{
Log_ErrorPrintf("Failed to create buffer.");
Log_ErrorPrint("Failed to create buffer.");
return false;
}
@ -61,10 +61,9 @@ bool MetalStreamBuffer::ReserveMemory(u32 num_bytes, u32 alignment)
const u32 required_bytes = num_bytes + alignment;
// Check for sane allocations
if (required_bytes > m_size)
if (required_bytes > m_size) [[unlikely]]
{
Log_ErrorPrintf("Attempting to allocate %u bytes from a %u byte stream buffer", static_cast<u32>(num_bytes),
static_cast<u32>(m_size));
Log_ErrorFmt("Attempting to allocate {} bytes from a {} byte stream buffer", num_bytes, m_size);
Panic("Stream buffer overflow");
return false;
}