summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp
diff options
context:
space:
mode:
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;