@@ -255,7 +255,7 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {
255255 for (unsigned x = 0 ; x < width; x++) {
256256 // convert by copying greyscale channel to each R, G, B channels
257257 // assume float values are in [0..1]
258- const float value = CLAMP (src_pixel[x], 0 .0F , 1 .0F );
258+ const float value = std::clamp (src_pixel[x], 0 .0F , 1 .0F );
259259 dst_pixel[x].red = value;
260260 dst_pixel[x].green = value;
261261 dst_pixel[x].blue = value;
@@ -278,7 +278,7 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {
278278 for (unsigned x = 0 ; x < width; x++) {
279279 // convert by copying greyscale channel to each R, G, B channels
280280 // assume float values are in [0..1]
281- const float value = static_cast <float >(CLAMP (src_pixel[x], 0.0 , 1.0 ));
281+ const float value = static_cast <float >(std::clamp (src_pixel[x], 0.0 , 1.0 ));
282282 dst_pixel[x].red = value;
283283 dst_pixel[x].green = value;
284284 dst_pixel[x].blue = value;
@@ -300,9 +300,9 @@ FreeImage_ConvertToRGBF(FIBITMAP *dib) {
300300
301301 for (unsigned x = 0 ; x < width; x++) {
302302 // convert and skip alpha channel
303- dst_pixel[x].red = CLAMP (src_pixel[x].red , 0 .0F , 1 .0F );
304- dst_pixel[x].green = CLAMP (src_pixel[x].green , 0 .0F , 1 .0F );
305- dst_pixel[x].blue = CLAMP (src_pixel[x].blue , 0 .0F , 1 .0F );
303+ dst_pixel[x].red = std::clamp (src_pixel[x].red , 0 .0F , 1 .0F );
304+ dst_pixel[x].green = std::clamp (src_pixel[x].green , 0 .0F , 1 .0F );
305+ dst_pixel[x].blue = std::clamp (src_pixel[x].blue , 0 .0F , 1 .0F );
306306 }
307307 src_bits += src_pitch;
308308 dst_bits += dst_pitch;
0 commit comments