mirror of
https://github.com/SFML/SFML.git
synced 2025-02-18 06:18:01 +08:00
Use more C++17 inline variables
This commit is contained in:
parent
f5a9def56e
commit
a05daa62b7
@ -81,7 +81,7 @@ public:
|
|||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||||
static CurrentTextureType CurrentTexture;
|
static inline CurrentTextureType CurrentTexture;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Default constructor
|
/// \brief Default constructor
|
||||||
|
@ -174,10 +174,6 @@ std::vector<float> flatten(const sf::Glsl::Vec4* vectorArray, std::size_t length
|
|||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
Shader::CurrentTextureType Shader::CurrentTexture;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
struct Shader::UniformBinder
|
struct Shader::UniformBinder
|
||||||
{
|
{
|
||||||
@ -961,10 +957,6 @@ int Shader::getUniformLocation(const std::string& name)
|
|||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
Shader::CurrentTextureType Shader::CurrentTexture;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Shader::~Shader() = default;
|
Shader::~Shader() = default;
|
||||||
|
|
||||||
|
@ -85,10 +85,6 @@ unsigned int getDeviceUint(IOHIDDeviceRef ref, CFStringRef prop, unsigned int in
|
|||||||
|
|
||||||
namespace sf::priv
|
namespace sf::priv
|
||||||
{
|
{
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
JoystickImpl::Location JoystickImpl::m_locationIDs[sf::Joystick::Count] = {0};
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void JoystickImpl::initialize()
|
void JoystickImpl::initialize()
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ private:
|
|||||||
Joystick::Identification m_identification; ///< Joystick identification
|
Joystick::Identification m_identification; ///< Joystick identification
|
||||||
|
|
||||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||||
static Location m_locationIDs[sf::Joystick::Count]; ///< Global Joystick register
|
static inline Location m_locationIDs[sf::Joystick::Count]{}; ///< Global Joystick register
|
||||||
/// For a corresponding SFML index, m_locationIDs is either some USB
|
/// For a corresponding SFML index, m_locationIDs is either some USB
|
||||||
/// location or 0 if there isn't currently a connected joystick device
|
/// location or 0 if there isn't currently a connected joystick device
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user