diff options
author | weili <weili@chromium.org> | 2016-05-23 10:38:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-23 10:38:07 -0700 |
commit | 524fa626d71efeb2164c82d565f17f077035b7df (patch) | |
tree | 0ad13752db2c216dced6872671db7ef179def4a0 /xfa/fxbarcode/pdf417 | |
parent | 168fc2be3253fdfb8a58685b89d28a471fa4740a (diff) | |
download | pdfium-524fa626d71efeb2164c82d565f17f077035b7df.tar.xz |
Clean up more XFA code which causes warnings
This is part of efforts to bring XFA to chromium_code standard.
Most of them will have behavior change.
The details of these problems are:
xfa/fgas/layout/fgas_rtfbreak.cpp:
Wrong condition with misused variable
xfa/fgas/localization/fgas_locale.cpp
Unnecessary condition
xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
xfa/fxfa/app/xfa_fffield.cpp
Unreachable code should be the correct code
xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp
xfa/fxbarcode/qrcode/BC_QRDetector.cpp
Wrong condition logic
BUG=pdfium:29
Review-Url: https://codereview.chromium.org/2000073003
Diffstat (limited to 'xfa/fxbarcode/pdf417')
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp b/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp index 4c3d4dbdf2..4e1d8dd1e9 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417ScanningDecoder.cpp @@ -423,15 +423,13 @@ CBC_PDF417ScanningDecoder::createDecoderResultFromAmbiguousValues( } CBC_CommonDecoderResult* decoderResult = decodeCodewords(codewords, ecLevel, erasureArray, e); - if (e != BCExceptionNO) { - e = BCExceptionNO; - continue; - } else { + if (e == BCExceptionNO) return decoderResult; - } + + e = BCExceptionNO; if (ambiguousIndexCount.GetSize() == 0) { e = BCExceptionChecksumInstance; - return NULL; + return nullptr; } for (int32_t i = 0; i < ambiguousIndexCount.GetSize(); i++) { if (ambiguousIndexCount[i] < @@ -442,7 +440,7 @@ CBC_PDF417ScanningDecoder::createDecoderResultFromAmbiguousValues( ambiguousIndexCount[i] = 0; if (i == ambiguousIndexCount.GetSize() - 1) { e = BCExceptionChecksumInstance; - return NULL; + return nullptr; } } } |