diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-11 14:15:03 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-11 14:15:03 +0000 |
commit | 89fa5dfee5107736597682f174fdc95d0baec830 (patch) | |
tree | 35af8892240779553c5ebe339cd23d868fd86a51 /core/fxge/cfx_unicodeencodingex.cpp | |
parent | 382129e2bdb1337a5a82cbd96478aab02f9aff7d (diff) | |
download | pdfium-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/cfx_unicodeencodingex.cpp')
-rw-r--r-- | core/fxge/cfx_unicodeencodingex.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fxge/cfx_unicodeencodingex.cpp b/core/fxge/cfx_unicodeencodingex.cpp index 3f28d4295e..a8db745612 100644 --- a/core/fxge/cfx_unicodeencodingex.cpp +++ b/core/fxge/cfx_unicodeencodingex.cpp @@ -93,9 +93,8 @@ std::unique_ptr<CFX_UnicodeEncodingEx> FX_CreateFontEncodingEx( if (nEncodingID != FXFM_ENCODING_NONE) return FXFM_CreateFontEncoding(pFont, nEncodingID); - for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { - std::unique_ptr<CFX_UnicodeEncodingEx> pFontEncoding = - FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); + for (uint32_t id : g_EncodingID) { + auto pFontEncoding = FXFM_CreateFontEncoding(pFont, id); if (pFontEncoding) return pFontEncoding; } |