diff --git a/src/SFML/Audio/ALCheck.cpp b/src/SFML/Audio/ALCheck.cpp index fba83eb4b..f3fc8cf58 100644 --- a/src/SFML/Audio/ALCheck.cpp +++ b/src/SFML/Audio/ALCheck.cpp @@ -48,7 +48,7 @@ thread_local ALenum lastError(AL_NO_ERROR); namespace sf::priv { //////////////////////////////////////////////////////////// -void alCheckError(const std::filesystem::path& file, unsigned int line, const char* expression) +void alCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression) { // Get the last error ALenum errorCode = alGetError(); diff --git a/src/SFML/Audio/ALCheck.hpp b/src/SFML/Audio/ALCheck.hpp index 5be60ffda..b548353d8 100644 --- a/src/SFML/Audio/ALCheck.hpp +++ b/src/SFML/Audio/ALCheck.hpp @@ -30,6 +30,7 @@ #include #include +#include #if defined(__APPLE__) #pragma GCC diagnostic push @@ -73,7 +74,7 @@ namespace sf::priv /// \param expression The evaluated expression as a string /// //////////////////////////////////////////////////////////// -void alCheckError(const std::filesystem::path& file, unsigned int line, const char* expression); +void alCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression); //////////////////////////////////////////////////////////// diff --git a/src/SFML/Graphics/GLCheck.cpp b/src/SFML/Graphics/GLCheck.cpp index cbe78aa04..9b45795ad 100644 --- a/src/SFML/Graphics/GLCheck.cpp +++ b/src/SFML/Graphics/GLCheck.cpp @@ -35,7 +35,7 @@ namespace sf::priv { //////////////////////////////////////////////////////////// -void glCheckError(const std::filesystem::path& file, unsigned int line, const char* expression) +void glCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression) { // Get the last error GLenum errorCode = glGetError(); diff --git a/src/SFML/Graphics/GLCheck.hpp b/src/SFML/Graphics/GLCheck.hpp index 78df53326..5b54eef09 100644 --- a/src/SFML/Graphics/GLCheck.hpp +++ b/src/SFML/Graphics/GLCheck.hpp @@ -32,6 +32,7 @@ #include #include +#include namespace sf::priv @@ -65,6 +66,6 @@ namespace sf::priv /// \param expression The evaluated expression as a string /// //////////////////////////////////////////////////////////// -void glCheckError(const std::filesystem::path& file, unsigned int line, const char* expression); +void glCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression); } // namespace sf::priv diff --git a/src/SFML/Window/EGLCheck.cpp b/src/SFML/Window/EGLCheck.cpp index 6d0273abe..7d4d76468 100644 --- a/src/SFML/Window/EGLCheck.cpp +++ b/src/SFML/Window/EGLCheck.cpp @@ -38,7 +38,7 @@ namespace sf::priv { //////////////////////////////////////////////////////////// -void eglCheckError(const std::filesystem::path& file, unsigned int line, const char* expression) +void eglCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression) { // Obtain information about the success or failure of the most recent EGL // function called in the current thread diff --git a/src/SFML/Window/EGLCheck.hpp b/src/SFML/Window/EGLCheck.hpp index 308eb0102..1f63ce1c1 100644 --- a/src/SFML/Window/EGLCheck.hpp +++ b/src/SFML/Window/EGLCheck.hpp @@ -30,6 +30,7 @@ #include #include +#include namespace sf::priv @@ -63,6 +64,6 @@ namespace sf::priv /// \param expression The evaluated expression as a string /// //////////////////////////////////////////////////////////// -void eglCheckError(const std::filesystem::path& file, unsigned int line, const char* expression); +void eglCheckError(const std::filesystem::path& file, unsigned int line, std::string_view expression); } // namespace sf::priv