Browse Source

MagnumFont: don't need a growable array for this.

That was a brain fart in 47a1295ab8,
pushed too fast.
pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
2274215165
  1. 8
      src/MagnumPlugins/MagnumFont/MagnumFont.cpp

8
src/MagnumPlugins/MagnumFont/MagnumFont.cpp

@ -26,7 +26,7 @@
#include "MagnumFont.h"
#include <sstream>
#include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/Pair.h>
#include <Corrade/Containers/Triple.h>
@ -119,9 +119,9 @@ auto MagnumFont::doOpenData(const Containers::ArrayView<const char> data, const
/* Glyph advances */
const std::vector<Utility::ConfigurationGroup*> glyphs = _opened->conf.groups("glyph");
arrayReserve(_opened->glyphAdvance, glyphs.size());
for(const Utility::ConfigurationGroup* const g: glyphs)
arrayAppend(_opened->glyphAdvance, g->value<Vector2>("advance"));
_opened->glyphAdvance = Containers::Array<Vector2>{NoInit, glyphs.size()};
for(std::size_t i = 0; i != glyphs.size(); ++i)
_opened->glyphAdvance[i] = glyphs[i]->value<Vector2>("advance");
/* Fill character->glyph map */
const std::vector<Utility::ConfigurationGroup*> chars = _opened->conf.groups("char");

Loading…
Cancel
Save