From b391be2316c0f9859a504deabb5225a02c1b3e89 Mon Sep 17 00:00:00 2001 From: Shane Whitmire Date: Sun, 25 Jun 2023 15:52:49 -0500 Subject: [PATCH] Make glyph a struct This glyph class should most definetely be a struct. There aren't any functions into it. This PR is more of a philosophy question than anything else. I think we should make an argument for and against here too. --- include/SFML/Graphics/Glyph.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/SFML/Graphics/Glyph.hpp b/include/SFML/Graphics/Glyph.hpp index 0cfd93d55..8a5b01c75 100644 --- a/include/SFML/Graphics/Glyph.hpp +++ b/include/SFML/Graphics/Glyph.hpp @@ -38,12 +38,8 @@ namespace sf /// \brief Structure describing a glyph /// //////////////////////////////////////////////////////////// -class SFML_GRAPHICS_API Glyph +struct SFML_GRAPHICS_API Glyph { -public: - //////////////////////////////////////////////////////////// - // Member data - //////////////////////////////////////////////////////////// float advance{}; //!< Offset to move horizontally to the next character int lsbDelta{}; //!< Left offset after forced autohint. Internally used by getKerning() int rsbDelta{}; //!< Right offset after forced autohint. Internally used by getKerning() @@ -55,7 +51,7 @@ public: //////////////////////////////////////////////////////////// -/// \class sf::Glyph +/// \struct sf::Glyph /// \ingroup graphics /// /// A glyph is the visual representation of a character.