summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_buffer.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-11 11:59:17 -0800
committerLei Zhang <thestig@chromium.org>2016-01-11 11:59:17 -0800
commit375a86403b7fa8d17d7b142c270e2d8e33bb924f (patch)
tree1db1ffddb2bbbcd429cd1d7954b1949bfa54e1ab /core/src/fxcrt/fx_basic_buffer.cpp
parent492961df3011ccc25646eae12ac6e6dcfe7f26da (diff)
downloadpdfium-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 'core/src/fxcrt/fx_basic_buffer.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_buffer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index e5c6c6d4b9..4ef86bbf41 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) {