summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-11 11:59:17 -0800
committerLei Zhang <thestig@chromium.org>2016-01-11 11:59:17 -0800
commit375a86403b7fa8d17d7b142c270e2d8e33bb924f (patch)
tree1db1ffddb2bbbcd429cd1d7954b1949bfa54e1ab /xfa/src/fxbarcode/datamatrix
parent492961df3011ccc25646eae12ac6e6dcfe7f26da (diff)
downloadpdfium-375a86403b7fa8d17d7b142c270e2d8e33bb924f.tar.xz
Merge to XFA: Switch most min/max macros to std::min/max.
Fix lint errors along the way. R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567343002 . (cherry picked from commit 9adfbb0920a258e916003b1ee9515e97879db82a) Review URL: https://codereview.chromium.org/1577503002 .
Diffstat (limited to 'xfa/src/fxbarcode/datamatrix')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
index c930f0e45d..27c29afe77 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
@@ -20,6 +20,8 @@
* limitations under the License.
*/
+#include <algorithm>
+
#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/BC_ResultPoint.h"
#include "xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h"
@@ -166,7 +168,7 @@ CBC_QRDetectorResult* CBC_DataMatrixDetector::Detect(int32_t& e) {
correctedTopRight.get(), dimensionTop, dimensionRight, e));
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
} else {
- int32_t dimension = FX_MIN(dimensionRight, dimensionTop);
+ int32_t dimension = std::min(dimensionRight, dimensionTop);
correctedTopRight = CBC_AutoPtr<CBC_ResultPoint>(
CorrectTopRight(bottomLeft, bottomRight, topLeft, topRight, dimension));
if (correctedTopRight.get() == NULL) {
@@ -176,12 +178,12 @@ CBC_QRDetectorResult* CBC_DataMatrixDetector::Detect(int32_t& e) {
topRight = NULL;
}
int32_t dimensionCorrected =
- FX_MAX(CBC_AutoPtr<CBC_ResultPointsAndTransitions>(
- TransitionsBetween(topLeft, correctedTopRight.get()))
- ->GetTransitions(),
- CBC_AutoPtr<CBC_ResultPointsAndTransitions>(
- TransitionsBetween(bottomRight, correctedTopRight.get()))
- ->GetTransitions());
+ std::max(CBC_AutoPtr<CBC_ResultPointsAndTransitions>(
+ TransitionsBetween(topLeft, correctedTopRight.get()))
+ ->GetTransitions(),
+ CBC_AutoPtr<CBC_ResultPointsAndTransitions>(
+ TransitionsBetween(bottomRight, correctedTopRight.get()))
+ ->GetTransitions());
dimensionCorrected++;
if ((dimensionCorrected & 0x01) == 1) {
dimensionCorrected++;