Utility/PixelFormat: use std::string_view to store name
This commit is contained in:
@@ -134,7 +134,7 @@ namespace Nz
|
||||
{
|
||||
PixelFormatContent formatContent = PixelFormatInfo::GetContent(format);
|
||||
if (formatContent != PixelFormatContent::DepthStencil && formatContent != PixelFormatContent::Stencil)
|
||||
NazaraWarning("Invalid format " + PixelFormatInfo::GetName(format) + " for depth-stencil attachment");
|
||||
NazaraWarning("Invalid format " + std::string(PixelFormatInfo::GetName(format)) + " for depth-stencil attachment");
|
||||
|
||||
m_depthStencilFormat = ToVulkan(format);
|
||||
if (m_depthStencilFormat == VK_FORMAT_UNDEFINED)
|
||||
|
||||
@@ -553,7 +553,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
default:
|
||||
throw std::runtime_error("Unsupported pixel format " + PixelFormatInfo::GetName(pixelFormat));
|
||||
throw std::runtime_error("Unsupported pixel format " + std::string(PixelFormatInfo::GetName(pixelFormat)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user