summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix
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/datamatrix
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/datamatrix')
-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] &&