diff --git a/src/common/font_loader.cpp b/src/common/font_loader.cpp index 3d6f0f86..9cb3eaeb 100644 --- a/src/common/font_loader.cpp +++ b/src/common/font_loader.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/common/font_loader.h b/src/common/font_loader.h index d2986e0e..644ed98e 100644 --- a/src/common/font_loader.h +++ b/src/common/font_loader.h @@ -31,6 +31,7 @@ #include #include +#include /** * \class CFontLoader diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 0f3d5c6f..ed063129 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -291,7 +291,7 @@ private: { if (auto font = fontLoader.GetFont(type)) { - m_fonts[type] = MakeUnique(std::move(*font)); + m_fonts[type] = std::make_unique(std::move(*font)); return true; } m_error = "Error on loading fonts: font type " + ToString(type) + " is not configured"; @@ -319,7 +319,7 @@ private: return nullptr; } GetLogger()->Debug("Loaded font file %s (font size = %d)\n", multisizeFont->fileName.c_str(), pointSize); - auto newFont = MakeUnique(std::move(file), pointSize); + auto newFont = std::make_unique(std::move(file), pointSize); if (newFont->font == nullptr) { m_error = std::string("TTF_OpenFont error ") + std::string(TTF_GetError()); @@ -335,7 +335,7 @@ private: m_lastFontSize = pointSize; } - bool IsLastCachedFont(FontType font, int pointSize) + bool IsLastCachedFont(FontType font, int pointSize) const { return m_lastCachedFont != nullptr &&