summaryrefslogtreecommitdiff
path: root/core/fxge/apple
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-01-11 14:15:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-11 14:15:03 +0000
commit89fa5dfee5107736597682f174fdc95d0baec830 (patch)
tree35af8892240779553c5ebe339cd23d868fd86a51 /core/fxge/apple
parent382129e2bdb1337a5a82cbd96478aab02f9aff7d (diff)
downloadpdfium-89fa5dfee5107736597682f174fdc95d0baec830.tar.xz
Use range-based for-loops in a few more places.
Change-Id: Id403abaf3d142dc30a661bc64ff48dbd5b10948e Reviewed-on: https://pdfium-review.googlesource.com/22736 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/apple')
-rw-r--r--core/fxge/apple/fx_mac_imp.cpp6
1 files changed, 3 insertions, 3 deletions
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());
}
}