diff options
author | Lei Zhang <thestig@chromium.org> | 2016-01-11 11:59:17 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-01-11 11:59:17 -0800 |
commit | 375a86403b7fa8d17d7b142c270e2d8e33bb924f (patch) | |
tree | 1db1ffddb2bbbcd429cd1d7954b1949bfa54e1ab /xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp | |
parent | 492961df3011ccc25646eae12ac6e6dcfe7f26da (diff) | |
download | pdfium-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/oned/BC_OnedCode128Reader.cpp')
-rw-r--r-- | xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp index 601baa2a4c..cbc7a5a859 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp @@ -20,6 +20,8 @@ * limitations under the License.
*/
+#include <algorithm>
+
#include "xfa/src/fxbarcode/barcode.h"
#include "xfa/src/fxbarcode/BC_Reader.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
@@ -115,7 +117,7 @@ CFX_Int32Array* CBC_OnedCode128Reader::FindStartPattern(CBC_CommonBitArray* row, }
if (bestMatch >= 0) {
FX_BOOL btemp2 =
- row->IsRange(FX_MAX(0, patternStart - (i - patternStart) / 2),
+ row->IsRange(std::max(0, patternStart - (i - patternStart) / 2),
patternStart, FALSE, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
if (btemp2) {
@@ -338,8 +340,8 @@ CFX_ByteString CBC_OnedCode128Reader::DecodeRow(int32_t rowNumber, nextStart++;
}
FX_BOOL boolT1 = row->IsRange(
- nextStart, FX_MIN(width, nextStart + (nextStart - lastStart) / 2), FALSE,
- e);
+ nextStart, std::min(width, nextStart + (nextStart - lastStart) / 2),
+ FALSE, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
if (!boolT1) {
e = BCExceptionNotFound;
|