summaryrefslogtreecommitdiff
path: root/xBRZ/src/xbrz_tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'xBRZ/src/xbrz_tools.h')
-rw-r--r--xBRZ/src/xbrz_tools.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xBRZ/src/xbrz_tools.h b/xBRZ/src/xbrz_tools.h
index 32e2090f..d83e5acc 100644
--- a/xBRZ/src/xbrz_tools.h
+++ b/xBRZ/src/xbrz_tools.h
@@ -108,7 +108,7 @@ inline
unsigned char demultiply(unsigned char c, unsigned char alpha)
{
return static_cast<unsigned char>(alpha == 0 ? 0 :
- std::clamp(uintDivRound(static_cast<unsigned int>(c) * 255, alpha), 0U, 255U));
+ std::min(uintDivRound(static_cast<unsigned int>(c) * 255, alpha), 255U));
}
bgstack15