From 0f4e2f8a3719d8ffb62a2a47ac408f939cdaa89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 28 Mar 2013 13:04:01 +0100 Subject: [PATCH] Text: made constructors explicit. --- src/Text/AbstractFont.h | 4 ++-- src/Text/FreeTypeFont.cpp | 2 +- src/Text/HarfBuzzFont.cpp | 2 +- src/Text/TextRenderer.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Text/AbstractFont.h b/src/Text/AbstractFont.h index aa22df3c1..631974f24 100644 --- a/src/Text/AbstractFont.h +++ b/src/Text/AbstractFont.h @@ -48,7 +48,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont { AbstractFont& operator=(const AbstractFont&&) = delete; public: - AbstractFont(); + explicit AbstractFont(); virtual ~AbstractFont() = 0; /** @brief %Font texture atlas */ @@ -81,7 +81,7 @@ class MAGNUM_TEXT_EXPORT AbstractLayouter { AbstractLayouter& operator=(const AbstractLayouter&&) = delete; public: - AbstractLayouter(); + explicit AbstractLayouter(); virtual ~AbstractLayouter() = 0; /** @brief Count of glyphs in laid out text */ diff --git a/src/Text/FreeTypeFont.cpp b/src/Text/FreeTypeFont.cpp index 4cd54b78c..c9d3e3f0a 100644 --- a/src/Text/FreeTypeFont.cpp +++ b/src/Text/FreeTypeFont.cpp @@ -40,7 +40,7 @@ namespace { class FreeTypeLayouter: public AbstractLayouter { public: - FreeTypeLayouter(FreeTypeFont& font, const Float size, const std::string& text); + explicit FreeTypeLayouter(FreeTypeFont& font, const Float size, const std::string& text); std::tuple renderGlyph(const Vector2& cursorPosition, const UnsignedInt i) override; diff --git a/src/Text/HarfBuzzFont.cpp b/src/Text/HarfBuzzFont.cpp index 6adf781e7..b3689017b 100644 --- a/src/Text/HarfBuzzFont.cpp +++ b/src/Text/HarfBuzzFont.cpp @@ -32,7 +32,7 @@ namespace { class HarfBuzzLayouter: public AbstractLayouter { public: - HarfBuzzLayouter(HarfBuzzFont& font, const Float size, const std::string& text); + explicit HarfBuzzLayouter(HarfBuzzFont& font, const Float size, const std::string& text); ~HarfBuzzLayouter(); std::tuple renderGlyph(const Vector2& cursorPosition, const UnsignedInt i) override; diff --git a/src/Text/TextRenderer.h b/src/Text/TextRenderer.h index 998c30bdb..bb38b5d89 100644 --- a/src/Text/TextRenderer.h +++ b/src/Text/TextRenderer.h @@ -66,7 +66,7 @@ class MAGNUM_TEXT_EXPORT AbstractTextRenderer { * @param font %Font to use * @param size %Font size */ - AbstractTextRenderer(AbstractFont& font, Float size); + explicit AbstractTextRenderer(AbstractFont& font, Float size); virtual ~AbstractTextRenderer() = 0; @@ -212,7 +212,7 @@ template class MAGNUM_TEXT_EXPORT TextRenderer: public A * @param font %Font to use * @param size %Font size */ - TextRenderer(AbstractFont& font, Float size); + explicit TextRenderer(AbstractFont& font, Float size); using AbstractTextRenderer::render; };