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/fgas/src/crt/fx_utils.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/fgas/src/crt/fx_utils.cpp')
-rw-r--r-- | xfa/src/fgas/src/crt/fx_utils.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp index 9d89e240f4..7cc4de7022 100644 --- a/xfa/src/fgas/src/crt/fx_utils.cpp +++ b/xfa/src/fgas/src/crt/fx_utils.cpp @@ -4,6 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "xfa/src/fgas/include/fx_utl.h"
#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_utils.h"
@@ -241,7 +243,8 @@ void CFX_BaseMassArrayImp::Append(int32_t iDstStart, uint8_t* pSrcChunk = (uint8_t*)src.GetAt(iSrcStart);
int32_t iDstChunkSize = m_iChunkSize - (iDstStart % m_iChunkSize);
int32_t iSrcChunkSize = src.m_iChunkSize - (iSrcStart % src.m_iChunkSize);
- int32_t iCopySize = FX_MIN(iSrcCount, FX_MIN(iSrcChunkSize, iDstChunkSize));
+ int32_t iCopySize =
+ std::min(iSrcCount, std::min(iSrcChunkSize, iDstChunkSize));
int32_t iCopyBytes = iCopySize * m_iBlockSize;
while (iSrcCount > 0) {
FXSYS_assert(pDstChunk != NULL && pSrcChunk != NULL);
@@ -263,7 +266,7 @@ void CFX_BaseMassArrayImp::Append(int32_t iDstStart, } else {
pDstChunk += iCopyBytes;
}
- iCopySize = FX_MIN(iSrcCount, FX_MIN(iSrcChunkSize, iDstChunkSize));
+ iCopySize = std::min(iSrcCount, std::min(iSrcChunkSize, iDstChunkSize));
iCopyBytes = iCopySize * m_iBlockSize;
}
}
|