diff options
author | Lei Zhang <thestig@chromium.org> | 2016-01-11 11:59:17 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-01-11 11:59:17 -0800 |
commit | 375a86403b7fa8d17d7b142c270e2d8e33bb924f (patch) | |
tree | 1db1ffddb2bbbcd429cd1d7954b1949bfa54e1ab /core/src/fpdfapi/fpdf_render | |
parent | 492961df3011ccc25646eae12ac6e6dcfe7f26da (diff) | |
download | pdfium-375a86403b7fa8d17d7b142c270e2d8e33bb924f.tar.xz |
Merge to XFA: Switch most min/max macros to std::min/max.
Fix lint errors along the way.
R=tsepez@chromium.org
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1567343002 .
(cherry picked from commit 9adfbb0920a258e916003b1ee9515e97879db82a)
Review URL: https://codereview.chromium.org/1577503002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index c74aea9a21..f690c209a0 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; |