summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index 3173c9c594..21e1b6bb51 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -20,6 +20,8 @@
* limitations under the License.
*/
+#include <limits>
+
#include "xfa/src/fxbarcode/BC_Dimension.h"
#include "xfa/src/fxbarcode/BC_UtilCodingConvert.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
@@ -36,8 +38,6 @@
#include "xfa/src/fxbarcode/datamatrix/BC_X12Encoder.h"
#include "xfa/src/fxbarcode/utils.h"
-#define Integer_MAX_VALUE 2147483647
-
FX_WCHAR CBC_HighLevelEncoder::LATCH_TO_C40 = 230;
FX_WCHAR CBC_HighLevelEncoder::LATCH_TO_BASE256 = 231;
FX_WCHAR CBC_HighLevelEncoder::UPPER_SHIFT = 235;
@@ -166,7 +166,7 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
int32_t charsProcessed = 0;
while (TRUE) {
if ((startpos + charsProcessed) == msg.GetLength()) {
- FX_DWORD min = Integer_MAX_VALUE;
+ FX_DWORD min = std::numeric_limits<int32_t>::max();
CFX_ByteArray mins;
mins.SetSize(6);
CFX_Int32Array intCharCounts;
@@ -241,7 +241,8 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
intCharCounts.SetSize(6);
CFX_ByteArray mins;
mins.SetSize(6);
- findMinimums(charCounts, intCharCounts, Integer_MAX_VALUE, mins);
+ findMinimums(charCounts, intCharCounts,
+ std::numeric_limits<int32_t>::max(), mins);
int32_t minCount = getMinimumCount(mins);
if (intCharCounts[ASCII_ENCODATION] < intCharCounts[BASE256_ENCODATION] &&
intCharCounts[ASCII_ENCODATION] < intCharCounts[C40_ENCODATION] &&