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

Unified Diff: xfa/src/fdp/src/fde/fde_gedevice.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/fdp/src/css/fde_csscache.cpp ('k') | xfa/src/fdp/src/tto/fde_textout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fdp/src/fde/fde_gedevice.cpp
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index 08f05e74bb2c689dbcce2542dda6d07d848b60bb..f4e46d0d81c2a68fa220dfc0802442e4c5f8cd1d 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "xfa/src/foxitlib.h"
#include "fde_gedevice.h"
#include "fde_geobject.h"
@@ -541,7 +543,7 @@ FX_BOOL CFDE_FxgeDevice::FillLinearGradientPath(IFDE_Brush* pBrush,
FX_FLOAT fLength = fDiagonal.Length();
FX_FLOAT fTotalX = fLength / FXSYS_cos(fTheta);
FX_FLOAT fTotalY = fLength / FXSYS_cos(FX_PI / 2 - fTheta);
- FX_FLOAT fSteps = FX_MAX(fTotalX, fTotalY);
+ FX_FLOAT fSteps = std::max(fTotalX, fTotalY);
FX_FLOAT dx = fTotalX / fSteps;
FX_FLOAT dy = fTotalY / fSteps;
FX_ARGB cr0, cr1;
« no previous file with comments | « xfa/src/fdp/src/css/fde_csscache.cpp ('k') | xfa/src/fdp/src/tto/fde_textout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698