From b351607996e467f89ce841630a84244fab6fe3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 7 Sep 2020 10:12:12 +0200 Subject: Cleanup: update comment after Clang-Tidy bugprone-incorrect-roundings fixes Remove the comment about adding `0.5`, as this is no longer done (since fb5e2f56109e). No functional changes. --- source/blender/imbuf/intern/imageprocess.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/imbuf/intern/imageprocess.c') diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index 79382e3be76..bcac140f036 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -201,8 +201,7 @@ void bilinear_interpolation_color_wrap( row3I = (unsigned char *)in->rect + ((size_t)in->x) * y1 * 4 + 4 * x2; row4I = (unsigned char *)in->rect + ((size_t)in->x) * y2 * 4 + 4 * x2; - /* need to add 0.5 to avoid rounding down (causes darken with the smear brush) - * tested with white images and this should not wrap back to zero */ + /* Tested with white images and this should not wrap back to zero. */ outI[0] = roundf(ma_mb * row1I[0] + a_mb * row3I[0] + ma_b * row2I[0] + a_b * row4I[0]); outI[1] = roundf(ma_mb * row1I[1] + a_mb * row3I[1] + ma_b * row2I[1] + a_b * row4I[1]); outI[2] = roundf(ma_mb * row1I[2] + a_mb * row3I[2] + ma_b * row2I[2] + a_b * row4I[2]); -- cgit v1.2.3