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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.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 | « core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp ('k') | core/src/fpdfdoc/doc_formcontrol.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index c74aea9a21dadc59253b721492175213bc5a6e6c..f690c209a0598c6c0ef832da9fc6ce2960baa34e 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -6,6 +6,7 @@
#include "render_int.h"
+#include <algorithm>
#include <memory>
#include <vector>
@@ -573,8 +574,8 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode,
for (FX_DWORD i = 0; i < m_nComponents; i++) {
int min_num = pArray->GetInteger(i * 2);
int max_num = pArray->GetInteger(i * 2 + 1);
- pCompData[i].m_ColorKeyMin = FX_MAX(min_num, 0);
- pCompData[i].m_ColorKeyMax = FX_MIN(max_num, max_data);
+ pCompData[i].m_ColorKeyMin = std::max(min_num, 0);
+ pCompData[i].m_ColorKeyMax = std::min(max_num, max_data);
}
}
bColorKey = TRUE;
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp ('k') | core/src/fpdfdoc/doc_formcontrol.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698