summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-24 15:39:55 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-24 15:39:55 -0500
commit320510d590f4e8df3a4725a87b54446c7009e57e (patch)
tree3cf0dfa98debaba19ea35a17b27046cb98305767 /xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp
parent86b5c31dc7c98af877a5e8952c5b55b9ea611f3c (diff)
downloadpdfium-320510d590f4e8df3a4725a87b54446c7009e57e.tar.xz
Remove include only barcode.h and IWYU.
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1730893003 .
Diffstat (limited to 'xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp')
-rw-r--r--xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp
index ca845ff04a..273f4906d1 100644
--- a/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp
+++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp
@@ -22,12 +22,14 @@
#include "xfa/src/fxbarcode/BC_BinaryBitmap.h"
#include "xfa/src/fxbarcode/BC_ResultPoint.h"
-#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
#include "xfa/src/fxbarcode/pdf417/BC_PDF417Detector.h"
#include "xfa/src/fxbarcode/pdf417/BC_PDF417DetectorResult.h"
-#define INTERGER_MAX 2147483647
+#include "xfa/src/fxbarcode/utils.h"
+
+#define INTEGER_MAX 2147483647
+
int32_t CBC_Detector::INDEXES_START_PATTERN[] = {0, 4, 1, 5};
int32_t CBC_Detector::INDEXES_STOP_PATTERN[] = {6, 2, 7, 3};
int32_t CBC_Detector::INTEGER_MATH_SHIFT = 8;
@@ -44,6 +46,7 @@ int32_t CBC_Detector::MAX_PATTERN_DRIFT = 5;
int32_t CBC_Detector::SKIPPED_ROW_COUNT_MAX = 25;
int32_t CBC_Detector::ROW_STEP = 5;
int32_t CBC_Detector::BARCODE_MIN_HEIGHT = 10;
+
CBC_Detector::CBC_Detector() {}
CBC_Detector::~CBC_Detector() {}
CBC_PDF417DetectorResult* CBC_Detector::detect(CBC_BinaryBitmap* image,
@@ -330,7 +333,7 @@ int32_t CBC_Detector::patternMatchVariance(CFX_Int32Array& counters,
patternLength += pattern[i];
}
if (total < patternLength) {
- return INTERGER_MAX;
+ return INTEGER_MAX;
}
int32_t unitBarWidth = (total << INTEGER_MATH_SHIFT) / patternLength;
maxIndividualVariance =
@@ -342,7 +345,7 @@ int32_t CBC_Detector::patternMatchVariance(CFX_Int32Array& counters,
int32_t variance = counter > scaledPattern ? counter - scaledPattern
: scaledPattern - counter;
if (variance > maxIndividualVariance) {
- return INTERGER_MAX;
+ return INTEGER_MAX;
}
totalVariance += variance;
}