Use more C++17 inline variables

This commit is contained in:
Chris Thrasher 2024-04-21 14:11:33 -06:00
parent f5a9def56e
commit a05daa62b7
4 changed files with 2 additions and 14 deletions

View File

@ -81,7 +81,7 @@ public:
///
////////////////////////////////////////////////////////////
// NOLINTNEXTLINE(readability-identifier-naming)
static CurrentTextureType CurrentTexture;
static inline CurrentTextureType CurrentTexture;
////////////////////////////////////////////////////////////
/// \brief Default constructor

View File

@ -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;

View File

@ -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()
{

View File

@ -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
};