diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-17 15:38:19 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-18 17:17:36 +0000 |
commit | 3c3e271ea9fd19dd535a74b5546b27e3e82dcb81 (patch) | |
tree | e73049f2d18718da9ff8d42b46f31009c5e6e887 /fxbarcode/oned/BC_OnedCode128Writer.cpp | |
parent | 94c5e25840046b7bf976d2d568e19ad63b656ade (diff) | |
download | pdfium-3c3e271ea9fd19dd535a74b5546b27e3e82dcb81.tar.xz |
Use Byte/WideString iterators
Change-Id: I85c8423c177fd7ecd5da90ef89419efc0f9cf44b
Reviewed-on: https://pdfium-review.googlesource.com/4262
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxbarcode/oned/BC_OnedCode128Writer.cpp')
-rw-r--r-- | fxbarcode/oned/BC_OnedCode128Writer.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fxbarcode/oned/BC_OnedCode128Writer.cpp b/fxbarcode/oned/BC_OnedCode128Writer.cpp index 53f4d01449..e2b6823414 100644 --- a/fxbarcode/oned/BC_OnedCode128Writer.cpp +++ b/fxbarcode/oned/BC_OnedCode128Writer.cpp @@ -113,22 +113,14 @@ CFX_WideString CBC_OnedCode128Writer::FilterContents( } CFX_WideString filtercontents; if (m_codeFormat == BC_CODE128_B) { - for (int32_t i = 0; i < filterChineseChar.GetLength(); i++) { - ch = filterChineseChar.GetAt(i); - if (ch >= 32 && ch <= 126) { + for (const auto& ch : filterChineseChar) { + if (ch >= 32 && ch <= 126) filtercontents += ch; - } else { - continue; - } } } else if (m_codeFormat == BC_CODE128_C) { - for (int32_t i = 0; i < filterChineseChar.GetLength(); i++) { - ch = filterChineseChar.GetAt(i); - if (ch >= 32 && ch <= 106) { + for (const auto& ch : filterChineseChar) { + if (ch >= 32 && ch <= 106) filtercontents += ch; - } else { - continue; - } } } else { filtercontents = contents; |