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

Unified Diff: fpdfsdk/src/fpdf_flatten.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 | « fpdfsdk/include/fxedit/fxet_edit.h ('k') | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_flatten.cpp
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 2a0c2d947c9c087dec0a53a51460512f731e97b1..50d50367241cca779dd42343b16ff809df7100cb 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -6,6 +6,8 @@
#include "public/fpdf_flatten.h"
+#include <algorithm>
+
#include "fpdfsdk/include/fsdk_define.h"
typedef CFX_ArrayTemplate<CPDF_Dictionary*> CPDF_ObjectArray;
@@ -300,8 +302,8 @@ void GetOffset(FX_FLOAT& fa,
FX_FLOAT x4 = matrix.a * rcStream.right + matrix.c * rcStream.top + matrix.e;
FX_FLOAT y4 = matrix.b * rcStream.right + matrix.d * rcStream.top + matrix.f;
- FX_FLOAT left = FX_MIN(FX_MIN(x1, x2), FX_MIN(x3, x4));
- FX_FLOAT bottom = FX_MIN(FX_MIN(y1, y2), FX_MIN(y3, y4));
+ FX_FLOAT left = std::min(std::min(x1, x2), std::min(x3, x4));
+ FX_FLOAT bottom = std::min(std::min(y1, y2), std::min(y3, y4));
fa = (rcAnnot.right - rcAnnot.left) / fStreamWidth;
fd = (rcAnnot.top - rcAnnot.bottom) / fStreamHeight;
« no previous file with comments | « fpdfsdk/include/fxedit/fxet_edit.h ('k') | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698