From ab27768d235985c0789a10ab490be43e262f48f6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 17 Feb 2016 10:07:21 -0800 Subject: Banish CFX_ByteArray and CFX_WideArray to the XFA side. Fix IWYU and include paths as we go. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701883004 . --- fpdfsdk/src/fsdk_mgr.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fpdfsdk/src/fsdk_mgr.cpp') 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; } -- cgit v1.2.3