From 89fa5dfee5107736597682f174fdc95d0baec830 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 11 Jan 2018 14:15:03 +0000 Subject: Use range-based for-loops in a few more places. Change-Id: Id403abaf3d142dc30a661bc64ff48dbd5b10948e Reviewed-on: https://pdfium-review.googlesource.com/22736 Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fxge/apple/fx_mac_imp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fxge/apple/fx_mac_imp.cpp') diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp index edd36bf2bc..3f75984f47 100644 --- a/core/fxge/apple/fx_mac_imp.cpp +++ b/core/fxge/apple/fx_mac_imp.cpp @@ -65,9 +65,9 @@ void* CFX_MacFontInfo::MapFont(int weight, int pitch_family, const char* cstr_face) { ByteString face = cstr_face; - for (size_t i = 0; i < FX_ArraySize(g_Base14Substs); ++i) { - if (face == ByteStringView(g_Base14Substs[i].m_pName)) { - face = g_Base14Substs[i].m_pSubstName; + for (const auto& sub : g_Base14Substs) { + if (face == ByteStringView(sub.m_pName)) { + face = sub.m_pSubstName; return GetFont(face.c_str()); } } -- cgit v1.2.3