summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-25 14:12:52 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-25 14:12:52 -0500
commitf014768833406e68234eeb4f8ba94cabf766dff3 (patch)
treefd07894bc8d8736998ef02ddf4809153270abeb1 /xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp
parenta3f220934a9f8325b00aba927ebc508d34a4de6f (diff)
downloadpdfium-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_PDF417CodewordDecoder.cpp')
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp
index 8bb2c1ebc8..ea1e38765a 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp
@@ -20,11 +20,12 @@
* limitations under the License.
*/
+#include <limits>
+
#include "xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.h"
#include "xfa/src/fxbarcode/pdf417/BC_PDF417Common.h"
#define SYMBOL_TABLE_Length 2787
-#define Float_MAX_VALUE 2147483647
FX_FLOAT CBC_PDF417CodewordDecoder::RATIOS_TABLE[2787][8] = {{0}};
@@ -99,7 +100,7 @@ int32_t CBC_PDF417CodewordDecoder::getClosestDecodedValue(
for (int32_t i = 0; i < bitCountRatios.GetSize(); i++) {
bitCountRatios[i] = moduleBitCount.GetAt(i) / (FX_FLOAT)bitCountSum;
}
- FX_FLOAT bestMatchError = (FX_FLOAT)Float_MAX_VALUE;
+ FX_FLOAT bestMatchError = std::numeric_limits<int32_t>::max();
int32_t bestMatch = -1;
for (int32_t j = 0; j < SYMBOL_TABLE_Length; j++) {
FX_FLOAT error = 0.0f;