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

Unified Diff: xfa/src/fxfa/src/app/xfa_ffwidget.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/fxfa/src/app/xfa_ffapp.cpp ('k') | xfa/src/fxfa/src/app/xfa_ffwidgetacc.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_ffwidget.cpp
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index 58047302e08df9c57fe4a8e98e2fb4cf775a37ff..08194bade152b93ecfc0ad2200cd8b0832516c61 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.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_ffapp.h"
@@ -776,7 +778,7 @@ void XFA_DrawImage(CFX_Graphics* pGS,
case XFA_ATTRIBUTEENUM_Fit: {
FX_FLOAT f1 = rtImage.height / rtFit.height;
FX_FLOAT f2 = rtImage.width / rtFit.width;
- f1 = FX_MIN(f1, f2);
+ f1 = std::min(f1, f2);
rtFit.height = rtFit.height * f1;
rtFit.width = rtFit.width * f1;
} break;
@@ -1116,7 +1118,7 @@ static void XFA_BOX_GetPath_Arc(CXFA_Box box,
a = rtDraw.width / 2.0f;
b = rtDraw.height / 2.0f;
if (box.IsCircular() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) {
- a = b = FX_MIN(a, b);
+ a = b = std::min(a, b);
}
CFX_PointF center = rtDraw.Center();
rtDraw.left = center.x - a;
@@ -1655,7 +1657,7 @@ static void XFA_BOX_StrokeArc(CXFA_Box box,
a = rtWidget.width / 2.0f;
b = rtWidget.height / 2.0f;
if (dwFlags & XFA_DRAWBOX_ForceRound) {
- a = b = FX_MIN(a, b);
+ a = b = std::min(a, b);
}
CFX_PointF center = rtWidget.Center();
rtWidget.left = center.x - a;
« no previous file with comments | « xfa/src/fxfa/src/app/xfa_ffapp.cpp ('k') | xfa/src/fxfa/src/app/xfa_ffwidgetacc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698