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

Unified Diff: xfa/src/fgas/src/crt/fx_utils.cpp

Issue 1577503002: Merge to XFA: Switch most min/max macros to std::min/max. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 4 years, 11 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
« no previous file with comments | « xfa/src/fgas/src/crt/fx_system.cpp ('k') | xfa/src/fgas/src/layout/fx_rtfbreak.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 9d89e240f40582f4b43bd54d35eafddd1b878472..7cc4de702237c7997105c89cd87f8483e3c1645d 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;
}
}
« no previous file with comments | « xfa/src/fgas/src/crt/fx_system.cpp ('k') | xfa/src/fgas/src/layout/fx_rtfbreak.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698