Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Unified Diff: xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp

Issue 1730893003: Remove include only barcode.h and IWYU. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Detector.cpp
index ca845ff04a257a8d0ff3faea0462c47814d5cc39..273f4906d1819910de4b5274968058965e03c0ee 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;
}

Powered by Google App Engine
This is Rietveld 408576698