summaryrefslogtreecommitdiff
path: root/src/fontcache.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-17 11:20:52 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commitab711e6942757d775c08c31a6c32d488feba1dba (patch)
treed102dc6d0e6b9c33e7205b63e3360ebd720a3ebb /src/fontcache.cpp
parent297fd3dda3abe353ebe2fe77c67b011e24d403bc (diff)
downloadopenttd-ab711e6942757d775c08c31a6c32d488feba1dba.tar.xz
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
Diffstat (limited to 'src/fontcache.cpp')
-rw-r--r--src/fontcache.cpp6
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;
}