From 31d946baa08a1c6170fe544a274ccfdeebe8ac74 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 22 Jan 2023 11:04:55 -0700 Subject: [PATCH] Convert empty struct to namespace --- src/SFML/Window/Unix/KeyboardImpl.hpp | 94 +++++++++++++-------------- 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/src/SFML/Window/Unix/KeyboardImpl.hpp b/src/SFML/Window/Unix/KeyboardImpl.hpp index 373dda965..e9e8cc0e1 100644 --- a/src/SFML/Window/Unix/KeyboardImpl.hpp +++ b/src/SFML/Window/Unix/KeyboardImpl.hpp @@ -32,66 +32,62 @@ #include // XKeyEvent -namespace sf::priv -{ //////////////////////////////////////////////////////////// /// \brief sf::priv::KeyboardImpl helper /// /// This class implements keyboard handling functions /// to help sf::priv::InputImpl class. //////////////////////////////////////////////////////////// -class KeyboardImpl +namespace sf::priv::KeyboardImpl { -public: - //////////////////////////////////////////////////////////// - /// \copydoc sf::Keyboard::isKeyPressed(Key) - /// - //////////////////////////////////////////////////////////// - static bool isKeyPressed(Keyboard::Key key); +//////////////////////////////////////////////////////////// +/// \copydoc sf::Keyboard::isKeyPressed(Key) +/// +//////////////////////////////////////////////////////////// +bool isKeyPressed(Keyboard::Key key); - //////////////////////////////////////////////////////////// - /// \copydoc sf::Keyboard::isKeyPressed(Scancode) - /// - //////////////////////////////////////////////////////////// - static bool isKeyPressed(Keyboard::Scancode code); +//////////////////////////////////////////////////////////// +/// \copydoc sf::Keyboard::isKeyPressed(Scancode) +/// +//////////////////////////////////////////////////////////// +bool isKeyPressed(Keyboard::Scancode code); - //////////////////////////////////////////////////////////// - /// \copydoc sf::Keyboard::localize - /// - //////////////////////////////////////////////////////////// - static Keyboard::Scancode delocalize(Keyboard::Key key); +//////////////////////////////////////////////////////////// +/// \copydoc sf::Keyboard::localize +/// +//////////////////////////////////////////////////////////// +Keyboard::Scancode delocalize(Keyboard::Key key); - //////////////////////////////////////////////////////////// - /// \copydoc sf::Keyboard::delocalize - /// - //////////////////////////////////////////////////////////// - static Keyboard::Key localize(Keyboard::Scancode code); +//////////////////////////////////////////////////////////// +/// \copydoc sf::Keyboard::delocalize +/// +//////////////////////////////////////////////////////////// +Keyboard::Key localize(Keyboard::Scancode code); - //////////////////////////////////////////////////////////// - /// \copydoc sf::Keyboard::getDescription - /// - //////////////////////////////////////////////////////////// - static String getDescription(Keyboard::Scancode code); +//////////////////////////////////////////////////////////// +/// \copydoc sf::Keyboard::getDescription +/// +//////////////////////////////////////////////////////////// +String getDescription(Keyboard::Scancode code); - //////////////////////////////////////////////////////////// - /// \brief Get the sf::Keyboard::Key from XKeyEvent - /// - /// \param event Event from which key is gotten - /// - /// \return A key being pressed or released - /// - //////////////////////////////////////////////////////////// - static Keyboard::Key getKeyFromEvent(XKeyEvent& event); +//////////////////////////////////////////////////////////// +/// \brief Get the sf::Keyboard::Key from XKeyEvent +/// +/// \param event Event from which key is gotten +/// +/// \return A key being pressed or released +/// +//////////////////////////////////////////////////////////// +Keyboard::Key getKeyFromEvent(XKeyEvent& event); - //////////////////////////////////////////////////////////// - /// \brief Get the sf::Keyboard::Scancode from XKeyEvent - /// - /// \param event Event from which scancode is gotten - /// - /// \return A scancode of a key being pressed or released - /// - //////////////////////////////////////////////////////////// - static Keyboard::Scancode getScancodeFromEvent(XKeyEvent& event); -}; +//////////////////////////////////////////////////////////// +/// \brief Get the sf::Keyboard::Scancode from XKeyEvent +/// +/// \param event Event from which scancode is gotten +/// +/// \return A scancode of a key being pressed or released +/// +//////////////////////////////////////////////////////////// +Keyboard::Scancode getScancodeFromEvent(XKeyEvent& event); -} // namespace sf::priv +} // namespace sf::priv::KeyboardImpl