diff options
Diffstat (limited to 'svx/source/tbxctrls/Palette.cxx')
-rw-r--r-- | svx/source/tbxctrls/Palette.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx index ccfe7b81ed77..b83b206cbe5a 100644 --- a/svx/source/tbxctrls/Palette.cxx +++ b/svx/source/tbxctrls/Palette.cxx @@ -72,9 +72,9 @@ static void lcl_CMYKtoRGB( float fCyan, float fMagenta, float fYellow, float fKe fMagenta = (fMagenta * ( 1.0 - fKey )) + fKey; fYellow = (fYellow * ( 1.0 - fKey )) + fKey; - dR = std::max( std::min( ( 1.0 - fCyan ), 1.0), 0.0 ); - dG = std::max( std::min( ( 1.0 - fMagenta ), 1.0), 0.0 ); - dB = std::max( std::min( ( 1.0 - fYellow ), 1.0), 0.0 ); + dR = std::clamp( 1.0 - fCyan, 0.0, 1.0 ); + dG = std::clamp( 1.0 - fMagenta, 0.0, 1.0 ); + dB = std::clamp( 1.0 - fYellow, 0.0, 1.0 ); } void PaletteASE::LoadPalette() |