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

Unified Diff: core/src/fxcrt/fx_basic_buffer.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 | « core/src/fxcrt/extension.h ('k') | core/src/fxcrt/fx_basic_wstring.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_basic_buffer.cpp
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index e5c6c6d4b9a97ced8c32108a15229a9fa228f4c3..4ef86bbf417cfa70bd78d02217b046a79d291cc7 100644
--- a/core/src/fxcrt/fx_basic_buffer.cpp
+++ b/core/src/fxcrt/fx_basic_buffer.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "core/include/fxcrt/fx_basic.h"
FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf);
@@ -401,7 +403,7 @@ int32_t IFX_BufferArchive::AppendBlock(const void* pBuf, size_t size) {
uint8_t* buffer = (uint8_t*)pBuf;
FX_STRSIZE temp_size = (FX_STRSIZE)size;
while (temp_size > 0) {
- FX_STRSIZE buf_size = FX_MIN(m_BufSize - m_Length, (FX_STRSIZE)temp_size);
+ FX_STRSIZE buf_size = std::min(m_BufSize - m_Length, (FX_STRSIZE)temp_size);
FXSYS_memcpy(m_pBuffer + m_Length, buffer, buf_size);
m_Length += buf_size;
if (m_Length == m_BufSize) {
« no previous file with comments | « core/src/fxcrt/extension.h ('k') | core/src/fxcrt/fx_basic_wstring.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698