diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-02-29 14:03:09 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-02-29 14:03:09 -0500 |
commit | a74e9c9d3b0d98c5d6042d7ca739cd921a4524db (patch) | |
tree | 6d19df6011716727dfcc59f4ef902331de813db3 /xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp | |
parent | a5585569e274fcff8ae106e412eb764c2787cb3f (diff) | |
download | pdfium-a74e9c9d3b0d98c5d6042d7ca739cd921a4524db.tar.xz |
Using size_t to silence warnings.
Change a couple int32_t's to size_t in order to fix warnings on OSX.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1747793002 .
Diffstat (limited to 'xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp')
-rw-r--r-- | xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp index 8bd4fe1ba4..89fed29ffa 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp @@ -124,30 +124,27 @@ CFX_WideString CBC_PDF417HighLevelEncoder::encodeHighLevel( } return sb; } + void CBC_PDF417HighLevelEncoder::Inverse() { - uint8_t i = 0; - int32_t l = 0; - for (l = 0; l < sizeof(MIXED) / sizeof(MIXED[0]); l++) { + for (size_t l = 0; l < FX_ArraySize(MIXED); ++l) MIXED[l] = -1; - } - for (i = 0; i < sizeof(TEXT_MIXED_RAW) / sizeof(TEXT_MIXED_RAW[0]); i++) { + + for (uint8_t i = 0; i < FX_ArraySize(TEXT_MIXED_RAW); ++i) { uint8_t b = TEXT_MIXED_RAW[i]; - if (b > 0) { + if (b != 0) MIXED[b] = i; - } } - for (l = 0; l < sizeof(PUNCTUATION) / sizeof(PUNCTUATION[0]); l++) { + + for (size_t l = 0; l < FX_ArraySize(PUNCTUATION); ++l) PUNCTUATION[l] = -1; - } - for (i = 0; - i < sizeof(TEXT_PUNCTUATION_RAW) / sizeof(TEXT_PUNCTUATION_RAW[0]); - i++) { + + for (uint8_t i = 0; i < FX_ArraySize(TEXT_PUNCTUATION_RAW); ++i) { uint8_t b = TEXT_PUNCTUATION_RAW[i]; - if (b > 0) { + if (b != 0) PUNCTUATION[b] = i; - } } } + int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg, int32_t startpos, int32_t count, |