From d50b640e42d46ab0f4d69cc58b3ba54e6137749c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 26 Oct 2015 15:26:34 -0700 Subject: Take FOXIT_FACE_COUNT and MM_FACE_COUNT constants from xfa Make master closer to XFA and eliminate some magic numbers. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1410823005 . --- core/src/fxge/ge/fx_ge_fontmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src/fxge/ge') diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index 08e9d4698c..af0a9efdaa 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -413,10 +413,10 @@ CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr) FXSYS_memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces)); } CFX_FontMapper::~CFX_FontMapper() { - for (int i = 0; i < 14; i++) - if (m_FoxitFaces[i]) { + for (size_t i = 0; i < FX_ArraySize(m_FoxitFaces); ++i) { + if (m_FoxitFaces[i]) FXFT_Done_Face(m_FoxitFaces[i]); - } + } if (m_MMFaces[0]) { FXFT_Done_Face(m_MMFaces[0]); } -- cgit v1.2.3