diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-13 04:47:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-13 04:47:47 +0400 |
commit | 0260e4b8a38cc567eda0679aaf7723ff442bdc34 (patch) | |
tree | cc389308b7db49d80733bcadaec28654b482649f /source/blender/editors/screen | |
parent | d6a291ca37fbe183873a62034692eab53e8d9278 (diff) |
code cleanup: quiet warnings
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 16 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 852ce02fa40..80270116a13 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -699,28 +699,28 @@ static void region_azone_tab_plus(ScrArea *sa, AZone *az, ARegion *ar) switch (az->edge) { case AE_TOP_TO_BOTTOMRIGHT: if (ar->winrct.ymax == sa->totrct.ymin) add = 1; else add = 0; - az->x1 = ar->winrct.xmax - 2.5 * AZONEPAD_TAB_PLUSW; + az->x1 = ar->winrct.xmax - 2.5f * AZONEPAD_TAB_PLUSW; az->y1 = ar->winrct.ymax - add; - az->x2 = ar->winrct.xmax - 1.5 * AZONEPAD_TAB_PLUSW; + az->x2 = ar->winrct.xmax - 1.5f * AZONEPAD_TAB_PLUSW; az->y2 = ar->winrct.ymax - add + AZONEPAD_TAB_PLUSH; break; case AE_BOTTOM_TO_TOPLEFT: - az->x1 = ar->winrct.xmax - 2.5 * AZONEPAD_TAB_PLUSW; + az->x1 = ar->winrct.xmax - 2.5f * AZONEPAD_TAB_PLUSW; az->y1 = ar->winrct.ymin - AZONEPAD_TAB_PLUSH; - az->x2 = ar->winrct.xmax - 1.5 * AZONEPAD_TAB_PLUSW; + az->x2 = ar->winrct.xmax - 1.5f * AZONEPAD_TAB_PLUSW; az->y2 = ar->winrct.ymin; break; case AE_LEFT_TO_TOPRIGHT: az->x1 = ar->winrct.xmin - AZONEPAD_TAB_PLUSH; - az->y1 = ar->winrct.ymax - 2.5 * AZONEPAD_TAB_PLUSW; + az->y1 = ar->winrct.ymax - 2.5f * AZONEPAD_TAB_PLUSW; az->x2 = ar->winrct.xmin; - az->y2 = ar->winrct.ymax - 1.5 * AZONEPAD_TAB_PLUSW; + az->y2 = ar->winrct.ymax - 1.5f * AZONEPAD_TAB_PLUSW; break; case AE_RIGHT_TO_TOPLEFT: az->x1 = ar->winrct.xmax - 1; - az->y1 = ar->winrct.ymax - 2.5 * AZONEPAD_TAB_PLUSW; + az->y1 = ar->winrct.ymax - 2.5f * AZONEPAD_TAB_PLUSW; az->x2 = ar->winrct.xmax - 1 + AZONEPAD_TAB_PLUSH; - az->y2 = ar->winrct.ymax - 1.5 * AZONEPAD_TAB_PLUSW; + az->y2 = ar->winrct.ymax - 1.5f * AZONEPAD_TAB_PLUSW; break; } /* rect needed for mouse pointer test */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 269cc672e34..5a99fc7ae4c 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3595,7 +3595,7 @@ typedef struct RegionAlphaInfo { } RegionAlphaInfo; #define TIMEOUT 0.3f -#define TIMESTEP 0.04 +#define TIMESTEP 0.04f float ED_region_blend_factor(ARegion *ar) { @@ -3609,7 +3609,7 @@ float ED_region_blend_factor(ARegion *ar) alpha = (float)ar->regiontimer->duration / TIMEOUT; /* makes sure the blend out works 100% - without area redraws */ - if (rgi->hidden) alpha = 0.9 - TIMESTEP - alpha; + if (rgi->hidden) alpha = 0.9f - TIMESTEP - alpha; CLAMP(alpha, 0.0f, 1.0f); return alpha; @@ -3697,7 +3697,7 @@ static int region_blend_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve ED_region_tag_redraw(rgi->child_ar); /* end timer? */ - if (rgi->ar->regiontimer->duration > TIMEOUT) { + if (rgi->ar->regiontimer->duration > (double)TIMEOUT) { region_blend_end(C, rgi->ar, 0); return (OPERATOR_FINISHED | OPERATOR_PASS_THROUGH); } |