diff --git a/include/SFML/Window/Context.hpp b/include/SFML/Window/Context.hpp index 2f7af96cd..f9d4667f7 100644 --- a/include/SFML/Window/Context.hpp +++ b/include/SFML/Window/Context.hpp @@ -34,6 +34,7 @@ #include #include +#include #include @@ -126,7 +127,7 @@ public: /// \return True if available, false if unavailable /// //////////////////////////////////////////////////////////// - static bool isExtensionAvailable(const char* name); + static bool isExtensionAvailable(std::string_view name); //////////////////////////////////////////////////////////// /// \brief Get the address of an OpenGL function diff --git a/src/SFML/Window/Context.cpp b/src/SFML/Window/Context.cpp index e92b52d26..46656f9bd 100644 --- a/src/SFML/Window/Context.cpp +++ b/src/SFML/Window/Context.cpp @@ -126,7 +126,7 @@ std::uint64_t Context::getActiveContextId() //////////////////////////////////////////////////////////// -bool Context::isExtensionAvailable(const char* name) +bool Context::isExtensionAvailable(std::string_view name) { return priv::GlContext::isExtensionAvailable(name); } diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp index 510af4164..6e0ca1f88 100644 --- a/src/SFML/Window/GlContext.cpp +++ b/src/SFML/Window/GlContext.cpp @@ -665,7 +665,7 @@ std::unique_ptr GlContext::create(const ContextSettings& settings, co //////////////////////////////////////////////////////////// -bool GlContext::isExtensionAvailable(const char* name) +bool GlContext::isExtensionAvailable(std::string_view name) { // If this function is called before any context is available, // the shared context will be created for the duration of this call diff --git a/src/SFML/Window/GlContext.hpp b/src/SFML/Window/GlContext.hpp index 1fae56989..17669bed4 100644 --- a/src/SFML/Window/GlContext.hpp +++ b/src/SFML/Window/GlContext.hpp @@ -138,7 +138,7 @@ public: /// \return True if available, false if unavailable /// //////////////////////////////////////////////////////////// - static bool isExtensionAvailable(const char* name); + static bool isExtensionAvailable(std::string_view name); //////////////////////////////////////////////////////////// /// \brief Get the address of an OpenGL function