Browse Source

Text: made constructors explicit.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
0f4e2f8a37
  1. 4
      src/Text/AbstractFont.h
  2. 2
      src/Text/FreeTypeFont.cpp
  3. 2
      src/Text/HarfBuzzFont.cpp
  4. 4
      src/Text/TextRenderer.h

4
src/Text/AbstractFont.h

@ -48,7 +48,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont {
AbstractFont& operator=(const AbstractFont&&) = delete; AbstractFont& operator=(const AbstractFont&&) = delete;
public: public:
AbstractFont(); explicit AbstractFont();
virtual ~AbstractFont() = 0; virtual ~AbstractFont() = 0;
/** @brief %Font texture atlas */ /** @brief %Font texture atlas */
@ -81,7 +81,7 @@ class MAGNUM_TEXT_EXPORT AbstractLayouter {
AbstractLayouter& operator=(const AbstractLayouter&&) = delete; AbstractLayouter& operator=(const AbstractLayouter&&) = delete;
public: public:
AbstractLayouter(); explicit AbstractLayouter();
virtual ~AbstractLayouter() = 0; virtual ~AbstractLayouter() = 0;
/** @brief Count of glyphs in laid out text */ /** @brief Count of glyphs in laid out text */

2
src/Text/FreeTypeFont.cpp

@ -40,7 +40,7 @@ namespace {
class FreeTypeLayouter: public AbstractLayouter { class FreeTypeLayouter: public AbstractLayouter {
public: public:
FreeTypeLayouter(FreeTypeFont& font, const Float size, const std::string& text); explicit FreeTypeLayouter(FreeTypeFont& font, const Float size, const std::string& text);
std::tuple<Rectangle, Rectangle, Vector2> renderGlyph(const Vector2& cursorPosition, const UnsignedInt i) override; std::tuple<Rectangle, Rectangle, Vector2> renderGlyph(const Vector2& cursorPosition, const UnsignedInt i) override;

2
src/Text/HarfBuzzFont.cpp

@ -32,7 +32,7 @@ namespace {
class HarfBuzzLayouter: public AbstractLayouter { class HarfBuzzLayouter: public AbstractLayouter {
public: public:
HarfBuzzLayouter(HarfBuzzFont& font, const Float size, const std::string& text); explicit HarfBuzzLayouter(HarfBuzzFont& font, const Float size, const std::string& text);
~HarfBuzzLayouter(); ~HarfBuzzLayouter();
std::tuple<Rectangle, Rectangle, Vector2> renderGlyph(const Vector2& cursorPosition, const UnsignedInt i) override; std::tuple<Rectangle, Rectangle, Vector2> renderGlyph(const Vector2& cursorPosition, const UnsignedInt i) override;

4
src/Text/TextRenderer.h

@ -66,7 +66,7 @@ class MAGNUM_TEXT_EXPORT AbstractTextRenderer {
* @param font %Font to use * @param font %Font to use
* @param size %Font size * @param size %Font size
*/ */
AbstractTextRenderer(AbstractFont& font, Float size); explicit AbstractTextRenderer(AbstractFont& font, Float size);
virtual ~AbstractTextRenderer() = 0; virtual ~AbstractTextRenderer() = 0;
@ -212,7 +212,7 @@ template<UnsignedInt dimensions> class MAGNUM_TEXT_EXPORT TextRenderer: public A
* @param font %Font to use * @param font %Font to use
* @param size %Font size * @param size %Font size
*/ */
TextRenderer(AbstractFont& font, Float size); explicit TextRenderer(AbstractFont& font, Float size);
using AbstractTextRenderer::render; using AbstractTextRenderer::render;
}; };

Loading…
Cancel
Save