From 10e8744ddf996842214cf77b2b173ee64c45d056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 26 Jun 2013 20:16:19 +0200 Subject: [PATCH] Text: ability to iterate over GlyphCache. --- src/Text/GlyphCache.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Text/GlyphCache.h b/src/Text/GlyphCache.h index 39dacc9c0..f88ca2318 100644 --- a/src/Text/GlyphCache.h +++ b/src/Text/GlyphCache.h @@ -105,6 +105,16 @@ class MAGNUM_TEXT_EXPORT GlyphCache { return it == glyphs.end() ? glyphs.at(0) : it->second; } + /** @brief Iterator access to cache data */ + std::unordered_map>::const_iterator begin() const { + return glyphs.begin(); + } + + /** @brief Iterator access to cache data */ + std::unordered_map>::const_iterator end() const { + return glyphs.end(); + } + /** * @brief Layout glyphs with given sizes to the cache *