diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-02-25 14:12:52 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-02-25 14:12:52 -0500 |
commit | f014768833406e68234eeb4f8ba94cabf766dff3 (patch) | |
tree | fd07894bc8d8736998ef02ddf4809153270abeb1 /xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp | |
parent | a3f220934a9f8325b00aba927ebc508d34a4de6f (diff) | |
download | pdfium-f014768833406e68234eeb4f8ba94cabf766dff3.tar.xz |
Replace various *_MAX_VALUE macros with numeric_limits.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1740783002 .
Diffstat (limited to 'xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp')
-rw-r--r-- | xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp index 7e5d0d8851..6365e27efb 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp @@ -20,6 +20,8 @@ * limitations under the License. */ +#include <limits> + #include "xfa/src/fxbarcode/BC_BinaryBitmap.h" #include "xfa/src/fxbarcode/BC_BinaryBitmap.h" #include "xfa/src/fxbarcode/BC_DecoderResult.h" @@ -51,10 +53,9 @@ #include "xfa/src/fxbarcode/pdf417/BC_PDF417ScanningDecoder.h" #include "xfa/src/fxbarcode/utils.h" -#define Integer_MAX_VALUE 2147483647 - CBC_PDF417Reader::CBC_PDF417Reader() {} CBC_PDF417Reader::~CBC_PDF417Reader() {} + CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap* image, int32_t& e) { return Decode(image, 0, e); } @@ -100,9 +101,8 @@ int32_t CBC_PDF417Reader::getMaxWidth(CBC_ResultPoint* p1, } int32_t CBC_PDF417Reader::getMinWidth(CBC_ResultPoint* p1, CBC_ResultPoint* p2) { - if (p1 == NULL || p2 == NULL) { - return Integer_MAX_VALUE; - } + if (!p1 || !p2) + return std::numeric_limits<int32_t>::max(); return (int32_t)FXSYS_fabs(p1->GetX() - p2->GetX()); } int32_t CBC_PDF417Reader::getMaxCodewordWidth(CFX_PtrArray& p) { |