From a5634f4bf444ab6e9f0f4e0570478954b3e32365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 7 Mar 2019 08:00:29 +0100 Subject: [PATCH] Text: fix annoying warnings on GCC 4.8. --- src/Magnum/Text/AbstractFont.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Magnum/Text/AbstractFont.h b/src/Magnum/Text/AbstractFont.h index 29657092d..ee3285485 100644 --- a/src/Magnum/Text/AbstractFont.h +++ b/src/Magnum/Text/AbstractFont.h @@ -275,6 +275,12 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin { * @see @ref doOpenFile(), @ref doOpenData(), @ref doOpenSingleData() */ struct Metrics { + #ifndef DOXYGEN_GENERATING_OUTPUT + /* Otherwise GCC 4.8 loudly complains about missing initializers */ + constexpr /*implicit*/ Metrics() noexcept: size{}, ascent{}, descent{}, lineHeight{} {} + constexpr /*implicit*/ Metrics(Float size, Float ascent, Float descent, Float lineHeight) noexcept: size{size}, ascent{ascent}, descent{descent}, lineHeight{lineHeight} {} + #endif + /** * Font size * @see @ref size()