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_OnedCode39Writer.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_OnedCode39Writer.cpp')
-rw-r--r-- | fxbarcode/oned/BC_OnedCode39Writer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fxbarcode/oned/BC_OnedCode39Writer.cpp b/fxbarcode/oned/BC_OnedCode39Writer.cpp index bcc64d83bd..b1a56cad40 100644 --- a/fxbarcode/oned/BC_OnedCode39Writer.cpp +++ b/fxbarcode/oned/BC_OnedCode39Writer.cpp @@ -163,11 +163,11 @@ char CBC_OnedCode39Writer::CalcCheckSum(const CFX_ByteString& contents, } int32_t checksum = 0; int32_t len = (int32_t)strlen(ALPHABET_STRING); - for (int32_t i = 0; i < contents.GetLength(); i++) { + for (const auto& c : contents) { int32_t j = 0; for (; j < len; j++) { - if (ALPHABET_STRING[j] == contents[i]) { - if (contents[i] != '*') + if (ALPHABET_STRING[j] == c) { + if (c != '*') checksum += j; break; } |