diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2017-08-18 07:44:42 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2017-08-18 07:44:52 +0200 |
commit | 55ab4264dc3f42a4588de0cf52e8f0f88e4fd90e (patch) | |
tree | a7b06056f0905327351131de60678f41a1283826 /src/fontengine.h | |
parent | 13e995b811e80dc48c0769274d3dca3a2221b843 (diff) | |
download | hax-minetest-server-55ab4264dc3f42a4588de0cf52e8f0f88e4fd90e.tar.gz hax-minetest-server-55ab4264dc3f42a4588de0cf52e8f0f88e4fd90e.zip |
Modernize various files
* range-based for loops
* emplace_back instead of push_back
* code style
* C++ headers instead of C headers
* Default operators
* empty stl function
Diffstat (limited to 'src/fontengine.h')
-rw-r--r-- | src/fontengine.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/fontengine.h b/src/fontengine.h index 0719edfc4..a75618f86 100644 --- a/src/fontengine.h +++ b/src/fontengine.h @@ -21,9 +21,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <map> #include <vector> -#include "IGUIFont.h" -#include "IGUISkin.h" -#include "IGUIEnvironment.h" +#include "util/basic_macros.h" +#include <IGUIFont.h> +#include <IGUISkin.h> +#include <IGUIEnvironment.h> #include "settings.h" #define FONT_SIZE_UNSPECIFIED 0xFFFFFFFF @@ -81,17 +82,6 @@ public: void readSettings(); private: - /** disable copy constructor */ - FontEngine() : - m_settings(NULL), - m_env(NULL), - m_font_cache(), - m_currentMode(FM_Standard), - m_lastMode(), - m_lastSize(0), - m_lastFont(NULL) - {}; - /** update content of font cache in case of a setting change made it invalid */ void updateFontCache(); @@ -108,10 +98,10 @@ private: void cleanCache(); /** pointer to settings for registering callbacks or reading config */ - Settings* m_settings; + Settings* m_settings = nullptr; /** pointer to irrlicht gui environment */ - gui::IGUIEnvironment* m_env; + gui::IGUIEnvironment* m_env = nullptr; /** internal storage for caching fonts of different size */ std::map<unsigned int, irr::gui::IGUIFont*> m_font_cache[FM_MaxMode]; @@ -131,6 +121,7 @@ private: /** last font returned */ irr::gui::IGUIFont* m_lastFont = nullptr; + DISABLE_CLASS_COPY(FontEngine); }; /** interface to access main font engine*/ |