From 375a86403b7fa8d17d7b142c270e2d8e33bb924f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 11 Jan 2016 11:59:17 -0800 Subject: 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 . --- xfa/src/fgas/src/crt/fx_utils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xfa/src/fgas/src/crt/fx_utils.cpp') 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 + #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; } } -- cgit v1.2.3