Index: fpdfsdk/src/fsdk_mgr.cpp |
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp |
index 65dc926fb3dcfe4b122b1db682d6afbfd1557bf9..fd30cf1f18492f7d3298a46931613502e742b5ea 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; |
} |