diff options
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_mgr.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index 65dc926fb3..fd30cf1f18 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -176,14 +176,11 @@ FX_BOOL CFX_SystemHandler::FindNativeTrueTypeFont( if (!pFontMapper) return FALSE; - int nSize = pFontMapper->m_InstalledTTFonts.GetSize(); - if (nSize == 0) { + if (pFontMapper->m_InstalledTTFonts.empty()) pFontMapper->LoadInstalledFonts(); - nSize = pFontMapper->m_InstalledTTFonts.GetSize(); - } - for (int i = 0; i < nSize; ++i) { - if (pFontMapper->m_InstalledTTFonts[i].Compare(sFontFaceName)) + for (const auto& font : pFontMapper->m_InstalledTTFonts) { + if (font.Compare(sFontFaceName)) return TRUE; } |