Browse Source

Text: fix ambiguous overload error that's happening with C++17 onwards.

pull/299/head
Pascal Thomet 8 years ago committed by Vladimír Vondruš
parent
commit
50bf219e53
  1. 5
      src/Magnum/Text/GlyphCache.cpp

5
src/Magnum/Text/GlyphCache.cpp

@ -64,8 +64,9 @@ void GlyphCache::initialize(const GL::TextureFormat internalFormat, const Vector
.setMagnificationFilter(GL::SamplerFilter::Linear) .setMagnificationFilter(GL::SamplerFilter::Linear)
.setStorage(1, internalFormat, size); .setStorage(1, internalFormat, size);
/* Default "Not Found" glyph */ /* Default "Not Found" glyph. Can't do just `.insert({0, {}})` because
glyphs.insert({0, {}}); that's ambiguous in C++17, due to a new insert(node_type&&) overload. */
glyphs.insert({0, std::pair<Vector2i, Range2Di>{}});
} }
std::vector<Range2Di> GlyphCache::reserve(const std::vector<Vector2i>& sizes) { std::vector<Range2Di> GlyphCache::reserve(const std::vector<Vector2i>& sizes) {

Loading…
Cancel
Save