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

Unified Diff: xfa/src/fwl/src/basewidget/fwl_checkboximp.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/fgas/src/xml/fx_sax_imp.cpp ('k') | xfa/src/fwl/src/basewidget/fwl_editimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp b/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp
index 3df1f21391044596715f69c4c5f0fc83c7277bf8..3fa2119b02df600c62d7327f940a97b45a2914e0 100644
--- a/xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_checkboximp.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/fwl/src/core/include/fwl_targetimp.h"
#include "xfa/src/fwl/src/core/include/fwl_noteimp.h"
@@ -245,8 +247,8 @@ void CFWL_CheckBoxImp::Layout() {
CalcTextRect(wsCaption, m_pProperties->m_pThemeProvider, m_dwTTOStyles,
m_iTTOAlign, rtFocus);
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_MultiLine) == 0) {
- FX_FLOAT fWidth = FX_MAX(m_rtCaption.width, rtFocus.width);
- FX_FLOAT fHeight = FX_MIN(m_rtCaption.height, rtFocus.height);
+ FX_FLOAT fWidth = std::max(m_rtCaption.width, rtFocus.width);
+ FX_FLOAT fHeight = std::min(m_rtCaption.height, rtFocus.height);
FX_FLOAT fLeft = m_rtCaption.left;
FX_FLOAT fTop = m_rtCaption.top;
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_HLayoutMask) ==
« no previous file with comments | « xfa/src/fgas/src/xml/fx_sax_imp.cpp ('k') | xfa/src/fwl/src/basewidget/fwl_editimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698