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

Unified Diff: xfa/src/fxfa/src/app/xfa_ffapp.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/fxbarcode/qrcode/BC_QRDetector.cpp ('k') | xfa/src/fxfa/src/app/xfa_ffwidget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxfa/src/app/xfa_ffapp.cpp
diff --git a/xfa/src/fxfa/src/app/xfa_ffapp.cpp b/xfa/src/fxfa/src/app/xfa_ffapp.cpp
index 0ce79e05dbe2d73b84cfbd7ca68526f09c34928e..fb37fb7ba3700fa948d7074a593a28daf281015f 100644
--- a/xfa/src/fxfa/src/app/xfa_ffapp.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffapp.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/common/xfa_common.h"
#include "xfa_ffdochandler.h"
@@ -47,7 +49,7 @@ FX_BOOL CXFA_FileRead::ReadBlock(void* buffer,
while (index < iCount) {
CPDF_StreamAcc& acc = m_Data[index];
FX_DWORD dwSize = acc.GetSize();
- FX_DWORD dwRead = FX_MIN(size, dwSize - offset);
+ size_t dwRead = std::min(size, static_cast<size_t>(dwSize - offset));
FXSYS_memcpy(buffer, acc.GetData() + offset, dwRead);
size -= dwRead;
if (size == 0) {
« no previous file with comments | « xfa/src/fxbarcode/qrcode/BC_QRDetector.cpp ('k') | xfa/src/fxfa/src/app/xfa_ffwidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698