From 2274215165831b14b725441d96f2ba3c74f624be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 24 Sep 2023 15:40:35 +0200 Subject: [PATCH] MagnumFont: don't need a growable array for this. That was a brain fart in 47a1295ab80d33210abae03fe03ed6953fa949b2, pushed too fast. --- src/MagnumPlugins/MagnumFont/MagnumFont.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp index 9fe6f9681..cc7926ec9 100644 --- a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp +++ b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp @@ -26,7 +26,7 @@ #include "MagnumFont.h" #include -#include +#include #include #include #include @@ -119,9 +119,9 @@ auto MagnumFont::doOpenData(const Containers::ArrayView data, const /* Glyph advances */ const std::vector glyphs = _opened->conf.groups("glyph"); - arrayReserve(_opened->glyphAdvance, glyphs.size()); - for(const Utility::ConfigurationGroup* const g: glyphs) - arrayAppend(_opened->glyphAdvance, g->value("advance")); + _opened->glyphAdvance = Containers::Array{NoInit, glyphs.size()}; + for(std::size_t i = 0; i != glyphs.size(); ++i) + _opened->glyphAdvance[i] = glyphs[i]->value("advance"); /* Fill character->glyph map */ const std::vector chars = _opened->conf.groups("char");