mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Replace const char*
with std::string_view
This commit is contained in:
parent
51676b65db
commit
b583eaf160
@ -34,6 +34,7 @@
|
|||||||
#include <SFML/System/Vector2.hpp>
|
#include <SFML/System/Vector2.hpp>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
@ -126,7 +127,7 @@ public:
|
|||||||
/// \return True if available, false if unavailable
|
/// \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
|
/// \brief Get the address of an OpenGL function
|
||||||
|
@ -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);
|
return priv::GlContext::isExtensionAvailable(name);
|
||||||
}
|
}
|
||||||
|
@ -665,7 +665,7 @@ std::unique_ptr<GlContext> 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,
|
// If this function is called before any context is available,
|
||||||
// the shared context will be created for the duration of this call
|
// the shared context will be created for the duration of this call
|
||||||
|
@ -138,7 +138,7 @@ public:
|
|||||||
/// \return True if available, false if unavailable
|
/// \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
|
/// \brief Get the address of an OpenGL function
|
||||||
|
Loading…
Reference in New Issue
Block a user