From af93ebcb503293e382f74c2d33554504269d4815 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Jan 2014 19:15:53 +1100 Subject: Code Cleanup: style and redundant casts --- source/blender/editors/interface/view2d.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 06f13c35e0b..544d9a0f575 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -823,17 +823,17 @@ void UI_view2d_curRect_reset(View2D *v2d) /* handle width - posx and negx flags are mutually exclusive, so watch out */ if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) { /* width is in negative-x half */ - v2d->cur.xmin = (float)-width; + v2d->cur.xmin = -width; v2d->cur.xmax = 0.0f; } else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) { /* width is in positive-x half */ v2d->cur.xmin = 0.0f; - v2d->cur.xmax = (float)width; + v2d->cur.xmax = width; } else { /* width is centered around (x == 0) */ - const float dx = (float)width / 2.0f; + const float dx = width / 2.0f; v2d->cur.xmin = -dx; v2d->cur.xmax = dx; @@ -842,17 +842,17 @@ void UI_view2d_curRect_reset(View2D *v2d) /* handle height - posx and negx flags are mutually exclusive, so watch out */ if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) { /* height is in negative-y half */ - v2d->cur.ymin = (float)-height; + v2d->cur.ymin = -height; v2d->cur.ymax = 0.0f; } else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) { /* height is in positive-y half */ v2d->cur.ymin = 0.0f; - v2d->cur.ymax = (float)height; + v2d->cur.ymax = height; } else { /* height is centered around (y == 0) */ - const float dy = (float)height / 2.0f; + const float dy = height / 2.0f; v2d->cur.ymin = -dy; v2d->cur.ymax = dy; -- cgit v1.2.3