diff --git a/src/SFML/Window/JoystickImpl.hpp b/src/SFML/Window/JoystickImpl.hpp index 2c0b6ffab..7a78f4af2 100644 --- a/src/SFML/Window/JoystickImpl.hpp +++ b/src/SFML/Window/JoystickImpl.hpp @@ -30,7 +30,6 @@ //////////////////////////////////////////////////////////// #include #include -#include namespace sf @@ -43,14 +42,8 @@ namespace priv //////////////////////////////////////////////////////////// struct JoystickCaps { - JoystickCaps() - { - buttonCount = 0; - std::fill(axes, axes + Joystick::AxisCount, false); - } - - unsigned int buttonCount; //!< Number of buttons supported by the joystick - bool axes[Joystick::AxisCount]; //!< Support for each axis + unsigned int buttonCount{0}; //!< Number of buttons supported by the joystick + bool axes[Joystick::AxisCount]{}; //!< Support for each axis }; @@ -60,16 +53,9 @@ struct JoystickCaps //////////////////////////////////////////////////////////// struct JoystickState { - JoystickState() - { - connected = false; - std::fill(axes, axes + Joystick::AxisCount, 0.f); - std::fill(buttons, buttons + Joystick::ButtonCount, false); - } - - bool connected; //!< Is the joystick currently connected? - float axes[Joystick::AxisCount]; //!< Position of each axis, in range [-100, 100] - bool buttons[Joystick::ButtonCount]; //!< Status of each button (true = pressed) + bool connected{false}; //!< Is the joystick currently connected? + float axes[Joystick::AxisCount]{}; //!< Position of each axis, in range [-100, 100] + bool buttons[Joystick::ButtonCount]{}; //!< Status of each button (true = pressed) }; } // namespace priv