mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +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)
|
||||
static CurrentTextureType CurrentTexture;
|
||||
static inline CurrentTextureType CurrentTexture;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Default constructor
|
||||
|
@ -174,10 +174,6 @@ std::vector<float> flatten(const sf::Glsl::Vec4* vectorArray, std::size_t length
|
||||
|
||||
namespace sf
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
Shader::CurrentTextureType Shader::CurrentTexture;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
struct Shader::UniformBinder
|
||||
{
|
||||
@ -961,10 +957,6 @@ int Shader::getUniformLocation(const std::string& name)
|
||||
|
||||
namespace sf
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
Shader::CurrentTextureType Shader::CurrentTexture;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
Shader::~Shader() = default;
|
||||
|
||||
|
@ -85,10 +85,6 @@ unsigned int getDeviceUint(IOHIDDeviceRef ref, CFStringRef prop, unsigned int in
|
||||
|
||||
namespace sf::priv
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
JoystickImpl::Location JoystickImpl::m_locationIDs[sf::Joystick::Count] = {0};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void JoystickImpl::initialize()
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ private:
|
||||
Joystick::Identification m_identification; ///< Joystick identification
|
||||
|
||||
// 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
|
||||
/// location or 0 if there isn't currently a connected joystick device
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user