summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/doc_utils.cpp')
-rw-r--r--core/src/fpdfdoc/doc_utils.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp
index 89836739b3..4856cb51e5 100644
--- a/core/src/fpdfdoc/doc_utils.cpp
+++ b/core/src/fpdfdoc/doc_utils.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "core/include/fpdfdoc/fpdf_doc.h"
#include "doc_utils.h"
@@ -179,9 +181,9 @@ void CPDF_DefaultAppearance::GetColor(FX_ARGB& color,
FX_FLOAT m = FX_atof((CFX_ByteString)syntax.GetWord());
FX_FLOAT y = FX_atof((CFX_ByteString)syntax.GetWord());
FX_FLOAT k = FX_atof((CFX_ByteString)syntax.GetWord());
- FX_FLOAT r = 1.0f - FX_MIN(1.0f, c + k);
- FX_FLOAT g = 1.0f - FX_MIN(1.0f, m + k);
- FX_FLOAT b = 1.0f - FX_MIN(1.0f, y + k);
+ FX_FLOAT r = 1.0f - std::min(1.0f, c + k);
+ FX_FLOAT g = 1.0f - std::min(1.0f, m + k);
+ FX_FLOAT b = 1.0f - std::min(1.0f, y + k);
color = ArgbEncode(255, (int)(r * 255 + 0.5f), (int)(g * 255 + 0.5f),
(int)(b * 255 + 0.5f));
}