Commit: b351607996e467f89ce841630a84244fab6fe3f5
Author: Sybren A. Stüvel
Date:   Mon Sep 7 10:12:12 2020 +0200
Branches: master
https://developer.blender.org/rBb351607996e467f89ce841630a84244fab6fe3f5

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.

===================================================================

M       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]);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to