Misc: Replace log printf calls with fmt
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user