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

Unified Diff: xfa/src/fgas/src/crt/fx_memory.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/fee/src/fee/fde_txtedtpage.cpp ('k') | xfa/src/fgas/src/crt/fx_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fgas/src/crt/fx_memory.cpp
diff --git a/xfa/src/fgas/src/crt/fx_memory.cpp b/xfa/src/fgas/src/crt/fx_memory.cpp
index a450119caf9bc9742ffcdbaf8521c8818c6cde4f..0f17dc8a7edb2777171c2808ffbccdd302af2c4c 100644
--- a/xfa/src/fgas/src/crt/fx_memory.cpp
+++ b/xfa/src/fgas/src/crt/fx_memory.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_memory.h"
#define FX_4BYTEALIGN(size) (((size) + 3) / 4 * 4)
@@ -59,7 +61,7 @@ FX_LPSTATICSTORECHUNK CFX_StaticStore::AllocChunk(size_t size) {
FX_LPSTATICSTORECHUNK CFX_StaticStore::FindChunk(size_t size) {
FXSYS_assert(size != 0);
if (m_pLastChunk == NULL || m_pLastChunk->iFreeSize < size) {
- return AllocChunk(FX_MAX(m_iDefChunkSize, size));
+ return AllocChunk(std::max(m_iDefChunkSize, size));
}
return m_pLastChunk;
}
@@ -242,7 +244,7 @@ void* CFX_DynamicStore::Alloc(size_t size) {
pChunk = pChunk->pNextChunk;
}
if (pChunk == NULL) {
- pChunk = AllocChunk(FX_MAX(m_iDefChunkSize, size));
+ pChunk = AllocChunk(std::max(m_iDefChunkSize, size));
pBlock = pChunk->FirstBlock();
}
FXSYS_assert(pChunk != NULL && pBlock != NULL);
« no previous file with comments | « xfa/src/fee/src/fee/fde_txtedtpage.cpp ('k') | xfa/src/fgas/src/crt/fx_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698