Replace Warning string concatenation by WarningFmt
This commit is contained in:
@@ -71,7 +71,7 @@ namespace Nz
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
NazaraWarning(std::string("Failed to load WGL: ") + e.what());
|
||||
NazaraWarningFmt("failed to load WGL: {0}", e.what());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Nz
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
NazaraWarning(std::string("Failed to load EGL: ") + e.what());
|
||||
NazaraWarningFmt("failed to load EGL: {0}", e.what());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Nz
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
NazaraWarning(std::string("Failed to load WebGL: ") + e.what());
|
||||
NazaraWarningFmt("failed to load WebGL: {0}", e.what());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/OpenGLRenderer/Utils.hpp>
|
||||
#include <NazaraUtils/Algorithm.hpp>
|
||||
#include <Nazara/Core/Format.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
@@ -31,6 +33,6 @@ namespace Nz
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS: return "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS: a framebuffer attachment is layered and a populated attachment is not (or color attachements are not from textures of the same target)";
|
||||
}
|
||||
|
||||
return "Unknown OpenGL error (0x" + NumberToString(code, 16) + ')';
|
||||
return Format("unknown OpenGL error ({0:#x})", code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace Nz::GL
|
||||
while (sampleCount > 1);
|
||||
|
||||
if (int(m_params.sampleCount) != sampleCount)
|
||||
NazaraWarning("couldn't find a pixel format matching " + std::to_string(m_params.sampleCount) + " sample count, using " + std::to_string(sampleCount) + " sample(s) instead");
|
||||
NazaraWarningFmt("couldn't find a pixel format matching {0} sample count, using {1} sample(s) instead", m_params.sampleCount, sampleCount);
|
||||
|
||||
m_params.sampleCount = sampleCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user