summaryrefslogtreecommitdiff
path: root/core/fxge/fx_ge_linux.cpp
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/fx_ge_linux.cpp
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/fx_ge_linux.cpp')
-rw-r--r--core/fxge/fx_ge_linux.cpp12
1 files changed, 6 insertions, 6 deletions
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();
}