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/fx_ge_linux.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/fxge/fx_ge_linux.cpp') diff --git a/core/fxge/fx_ge_linux.cpp b/core/fxge/fx_ge_linux.cpp index 22a3c4cd1b..65c9e56ff6 100644 --- a/core/fxge/fx_ge_linux.cpp +++ b/core/fxge/fx_ge_linux.cpp @@ -100,24 +100,24 @@ void* CFX_LinuxFontInfo::MapFont(int weight, break; } case FX_CHARSET_ChineseSimplified: { - for (size_t i = 0; i < FX_ArraySize(g_LinuxGbFontList); ++i) { - auto it = m_FontList.find(g_LinuxGbFontList[i]); + for (const char* name : g_LinuxGbFontList) { + auto it = m_FontList.find(name); if (it != m_FontList.end()) return it->second.get(); } break; } case FX_CHARSET_ChineseTraditional: { - for (size_t i = 0; i < FX_ArraySize(g_LinuxB5FontList); ++i) { - auto it = m_FontList.find(g_LinuxB5FontList[i]); + for (const char* name : g_LinuxB5FontList) { + auto it = m_FontList.find(name); if (it != m_FontList.end()) return it->second.get(); } break; } case FX_CHARSET_Hangul: { - for (size_t i = 0; i < FX_ArraySize(g_LinuxHGFontList); ++i) { - auto it = m_FontList.find(g_LinuxHGFontList[i]); + for (const char* name : g_LinuxHGFontList) { + auto it = m_FontList.find(name); if (it != m_FontList.end()) return it->second.get(); } -- cgit v1.2.3