diff options
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp index 1649eaf35d..9253563c38 100644 --- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp +++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp @@ -118,11 +118,9 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, CPDF_Font* pFind = NULL; - FX_POSITION pos = pFonts->GetStartPos(); - while (pos) { - CPDF_Object* pObj = NULL; - CFX_ByteString csKey; - pObj = pFonts->GetNextElement(pos, csKey); + for (const auto& it : *pFonts) { + const CFX_ByteString& csKey = it.first; + CPDF_Object* pObj = it.second; if (!pObj) continue; |