mirror of
https://github.com/SFML/SFML.git
synced 2025-01-18 23:35:11 +08:00
Make glCheckError
take a std::string_view
rather than constructing a std::filesystem::path
on error checks
This commit is contained in:
parent
0d34974a5e
commit
2c7c3dd056
@ -36,11 +36,11 @@
|
|||||||
namespace sf::priv
|
namespace sf::priv
|
||||||
{
|
{
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool glCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression)
|
bool glCheckError(std::string_view file, unsigned int line, std::string_view expression)
|
||||||
{
|
{
|
||||||
const auto logError = [&](const char* error, const char* description)
|
const auto logError = [&](const char* error, const char* description)
|
||||||
{
|
{
|
||||||
err() << "An internal OpenGL call failed in " << file.filename() << "(" << line << ")."
|
err() << "An internal OpenGL call failed in " << std::filesystem::path(file).filename() << "(" << line << ")."
|
||||||
<< "\nExpression:\n " << expression << "\nError description:\n " << error << "\n " << description << '\n'
|
<< "\nExpression:\n " << expression << "\nError description:\n " << error << "\n " << description << '\n'
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace sf::priv
|
|||||||
/// \return `false` if an error occurred, `true` otherwise
|
/// \return `false` if an error occurred, `true` otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool glCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression);
|
bool glCheckError(std::string_view file, unsigned int line, std::string_view expression);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// Macro to quickly check every OpenGL API call
|
/// Macro to quickly check every OpenGL API call
|
||||||
|
@ -38,11 +38,11 @@
|
|||||||
namespace sf::priv
|
namespace sf::priv
|
||||||
{
|
{
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool eglCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression)
|
bool eglCheckError(std::string_view file, unsigned int line, std::string_view expression)
|
||||||
{
|
{
|
||||||
const auto logError = [&](const char* error, const char* description)
|
const auto logError = [&](const char* error, const char* description)
|
||||||
{
|
{
|
||||||
err() << "An internal EGL call failed in " << file.filename() << "(" << line << ")."
|
err() << "An internal EGL call failed in " << std::filesystem::path(file).filename() << "(" << line << ")."
|
||||||
<< "\nExpression:\n " << expression << "\nError description:\n " << error << "\n " << description << '\n'
|
<< "\nExpression:\n " << expression << "\nError description:\n " << error << "\n " << description << '\n'
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace sf::priv
|
|||||||
/// \return `false` if an error occurred, `true` otherwise
|
/// \return `false` if an error occurred, `true` otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
bool eglCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression);
|
bool eglCheckError(std::string_view file, unsigned int line, std::string_view expression);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// Macro to quickly check every EGL API call
|
/// Macro to quickly check every EGL API call
|
||||||
|
Loading…
Reference in New Issue
Block a user