diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-09-04 17:23:00 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-09-04 17:23:08 +0300 |
commit | fb5e2f56109e825ce3c446f80e075ee3dde81c3d (patch) | |
tree | 20b5808415568f503b4ed4b56d3d4f50b5fe8cee /source/blender/blenkernel/intern/colortools.c | |
parent | ee49ce482a797a5937829de497abd69bcd1edb48 (diff) |
Cleanup: Clang-Tidy bugprone-incorrect-roundings fixes
Should cause no noticeable difference.
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 6fb2df04b3c..09731c15c0a 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1320,10 +1320,10 @@ void BKE_histogram_update_sample_line(Histogram *hist, const float *fp; unsigned char *cp; - int x1 = 0.5f + hist->co[0][0] * ibuf->x; - int x2 = 0.5f + hist->co[1][0] * ibuf->x; - int y1 = 0.5f + hist->co[0][1] * ibuf->y; - int y2 = 0.5f + hist->co[1][1] * ibuf->y; + int x1 = roundf(hist->co[0][0] * ibuf->x); + int x2 = roundf(hist->co[1][0] * ibuf->x); + int y1 = roundf(hist->co[0][1] * ibuf->y); + int y2 = roundf(hist->co[1][1] * ibuf->y); struct ColormanageProcessor *cm_processor = NULL; |