diff --git a/src/SFML/Graphics/GLCheck.cpp b/src/SFML/Graphics/GLCheck.cpp index 664882ea1..bf0368b95 100644 --- a/src/SFML/Graphics/GLCheck.cpp +++ b/src/SFML/Graphics/GLCheck.cpp @@ -36,11 +36,11 @@ 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) { - 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' << std::endl; diff --git a/src/SFML/Graphics/GLCheck.hpp b/src/SFML/Graphics/GLCheck.hpp index c3d99dadf..293f32dc9 100644 --- a/src/SFML/Graphics/GLCheck.hpp +++ b/src/SFML/Graphics/GLCheck.hpp @@ -50,7 +50,7 @@ namespace sf::priv /// \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 diff --git a/src/SFML/Window/EGLCheck.cpp b/src/SFML/Window/EGLCheck.cpp index 129578cc8..0c4976ce7 100644 --- a/src/SFML/Window/EGLCheck.cpp +++ b/src/SFML/Window/EGLCheck.cpp @@ -38,11 +38,11 @@ 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) { - 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' << std::endl; diff --git a/src/SFML/Window/EGLCheck.hpp b/src/SFML/Window/EGLCheck.hpp index 3d0bb030b..c30c19e30 100644 --- a/src/SFML/Window/EGLCheck.hpp +++ b/src/SFML/Window/EGLCheck.hpp @@ -50,7 +50,7 @@ namespace sf::priv /// \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