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

Unified Diff: xfa/src/fdp/src/css/fde_csscache.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/src/pdfwindow/PWL_Utils.cpp ('k') | xfa/src/fdp/src/fde/fde_gedevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fdp/src/css/fde_csscache.cpp
diff --git a/xfa/src/fdp/src/css/fde_csscache.cpp b/xfa/src/fdp/src/css/fde_csscache.cpp
index fd33019e189a5d7ee6fd86ba531ba31e907eee0a..3d3b040a87e41a116ee1cbc68e516c714bc66034 100644
--- a/xfa/src/fdp/src/css/fde_csscache.cpp
+++ b/xfa/src/fdp/src/css/fde_csscache.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_csscache.h"
_FDE_CSSCACHEITEM::_FDE_CSSCACHEITEM(IFDE_CSSStyleSheet* p)
@@ -34,8 +36,9 @@ void CFDE_CSSStyleSheetCache::AddStyleSheet(const CFX_ByteStringC& szKey,
IFDE_CSSStyleSheet* pStyleSheet) {
FXSYS_assert(pStyleSheet != NULL);
if (m_pFixedStore == NULL) {
- m_pFixedStore = FX_CreateAllocator(
- FX_ALLOCTYPE_Fixed, FX_MAX(10, m_iMaxItems), sizeof(FDE_CSSCACHEITEM));
+ m_pFixedStore =
+ FX_CreateAllocator(FX_ALLOCTYPE_Fixed, std::max(10, m_iMaxItems),
+ sizeof(FDE_CSSCACHEITEM));
FXSYS_assert(m_pFixedStore != NULL);
}
auto it = m_Stylesheets.find(szKey);
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_Utils.cpp ('k') | xfa/src/fdp/src/fde/fde_gedevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698