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/editors/space_sequencer/sequencer_draw.c | |
parent | ee49ce482a797a5937829de497abd69bcd1edb48 (diff) |
Cleanup: Clang-Tidy bugprone-incorrect-roundings fixes
Should cause no noticeable difference.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 6cfd33df7bf..298ed927b44 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1262,8 +1262,8 @@ ImBuf *sequencer_ibuf_get(struct Main *bmain, render_size = BKE_sequencer_rendersize_to_scale_factor(sseq->render_size); } - rectx = render_size * scene->r.xsch + 0.5; - recty = render_size * scene->r.ysch + 0.5; + rectx = roundf(render_size * scene->r.xsch); + recty = roundf(render_size * scene->r.ysch); BKE_sequencer_new_render_data( bmain, depsgraph, scene, rectx, recty, sseq->render_size, false, &context); @@ -1800,7 +1800,7 @@ void sequencer_draw_preview(const bContext *C, /* Setup view. */ sequencer_display_size(scene, viewrect); - UI_view2d_totRect_set(v2d, viewrect[0] + 0.5f, viewrect[1] + 0.5f); + UI_view2d_totRect_set(v2d, roundf(viewrect[0] + 0.5f), roundf(viewrect[1] + 0.5f)); UI_view2d_curRect_validate(v2d); UI_view2d_view_ortho(v2d); |