Codechange: Replace SmallPair with std::pair.

std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
This commit is contained in:
Michael Lutz
2020-05-17 23:31:44 +02:00
parent 7309bdec48
commit f2b40f40aa
9 changed files with 24 additions and 37 deletions

View File

@@ -211,7 +211,7 @@ protected:
int req_size; ///< Requested font size.
int used_size; ///< Used font size.
typedef SmallMap<uint32, SmallPair<size_t, const void*> > FontTable; ///< Table with font table cache
typedef SmallMap<uint32, std::pair<size_t, const void*> > FontTable; ///< Table with font table cache
FontTable font_tables; ///< Cached font tables.
/** Container for information about a glyph. */
@@ -434,7 +434,7 @@ const void *TrueTypeFontCache::GetFontTable(uint32 tag, size_t &length)
const void *result = this->InternalGetFontTable(tag, length);
this->font_tables.Insert(tag, SmallPair<size_t, const void *>(length, result));
this->font_tables.Insert(tag, std::pair<size_t, const void *>(length, result));
return result;
}