Index: fpdfsdk/src/fsdk_baseannot.cpp |
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp |
index 629f35a1d28af57ccd4ff6bad1e2bec970488a68..30e702241e7543d1e1ef9efed8e3b2725a76ac1a 100644 |
--- a/fpdfsdk/src/fsdk_baseannot.cpp |
+++ b/fpdfsdk/src/fsdk_baseannot.cpp |
@@ -4,6 +4,8 @@ |
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
+#include <algorithm> |
+ |
#include "core/include/fxcrt/fx_ext.h" |
#include "fpdfsdk/include/fsdk_baseannot.h" |
#include "fpdfsdk/include/fsdk_define.h" |
@@ -819,9 +821,9 @@ FX_BOOL CPDFSDK_BAAnnot::GetColor(FX_COLORREF& color) const { |
FX_FLOAT y = pEntry->GetNumber(2); |
FX_FLOAT k = pEntry->GetNumber(3); |
- 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 = FXSYS_RGB((int)(r * 255), (int)(g * 255), (int)(b * 255)); |