diff options
Diffstat (limited to 'src/fontcache.cpp')
-rw-r--r-- | src/fontcache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fontcache.cpp b/src/fontcache.cpp index 2811f1798..82a441814 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -411,8 +411,8 @@ FreeTypeFontCache::~FreeTypeFontCache() this->face = NULL; this->ClearFontCache(); - for (FontTable::iterator iter = this->font_tables.Begin(); iter != this->font_tables.End(); iter++) { - free(iter->second.second); + for (auto &iter : this->font_tables) { + free(iter.second.second); } } @@ -633,7 +633,7 @@ GlyphID FreeTypeFontCache::MapCharToGlyph(WChar key) const void *FreeTypeFontCache::GetFontTable(uint32 tag, size_t &length) { const FontTable::iterator iter = this->font_tables.Find(tag); - if (iter != this->font_tables.End()) { + if (iter != this->font_tables.data() + this->font_tables.size()) { length = iter->second.first; return iter->second.second; } |