From 4c44a1fc041aeae2ca82649490e86dc38184a6a0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 3 Apr 2011 13:17:07 +0000 Subject: quiet warnings. --- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/editors/space_file/file_ops.c | 2 +- source/blender/editors/space_file/filesel.c | 2 +- source/blender/windowmanager/intern/wm_operators.c | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e8fa56c4b01..375190a0e7b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11528,7 +11528,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for (brush= main->brush.first; brush; brush= brush->id.next) { if(brush->height == 0) - brush->height= 0.4; + brush->height= 0.4f; } /* replace 'rim material' option for in offset*/ diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 7f8fe3eb4d8..36738e42d0e 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -82,7 +82,7 @@ static FileSelection find_file_mouse_rect(SpaceFile *sfile, struct ARegion* ar, UI_view2d_region_to_view(v2d, rect->xmin, rect->ymin, &fxmin, &fymin); UI_view2d_region_to_view(v2d, rect->xmax, rect->ymax, &fxmax, &fymax); - BLI_init_rcti(&rect_view, v2d->tot.xmin + fxmin, v2d->tot.xmin + fxmax, v2d->tot.ymax - fymin, v2d->tot.ymax - fymax); + BLI_init_rcti(&rect_view, (int)(v2d->tot.xmin + fxmin), (int)(v2d->tot.xmin + fxmax), (int)(v2d->tot.ymax - fymin), (int)(v2d->tot.ymax - fymax)); sel = ED_fileselect_layout_offset_rect(sfile->layout, &rect_view); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 0e61d30cccd..d0cae134ef9 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -247,7 +247,7 @@ int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar) int numfiles; if (layout->flag & FILE_LAYOUT_HOR) { - int width = ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x; + int width = (int)(ar->v2d.cur.xmax - ar->v2d.cur.xmin - 2*layout->tile_border_x); numfiles = (float)width/(float)layout->tile_w + 0.5f; return numfiles*layout->rows; } else { diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 8f10b164f8f..53a4af8731a 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -906,7 +906,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE); - uiPopupBoundsBlock(block, 4.0f, 0, 0); + uiPopupBoundsBlock(block, 4, 0, 0); uiEndBlock(C, block); return block; @@ -969,7 +969,7 @@ static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData) } /* center around the mouse */ - uiPopupBoundsBlock(block, 4.0f, data->width/-2, data->height/2); + uiPopupBoundsBlock(block, 4, data->width/-2, data->height/2); uiEndBlock(C, block); return block; @@ -992,7 +992,7 @@ static uiBlock *wm_operator_create_ui(bContext *C, ARegion *ar, void *userData) /* since ui is defined the auto-layout args are not used */ uiLayoutOperatorButs(C, layout, op, NULL, 'V', 0); - uiPopupBoundsBlock(block, 4.0f, 0, 0); + uiPopupBoundsBlock(block, 4, 0, 0); uiEndBlock(C, block); return block; @@ -1264,7 +1264,7 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *UNUSED(arg_ /* fake button, it holds space for search items */ uiDefBut(block, LABEL, 0, "", 10, 10 - uiSearchBoxhHeight(), 180, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); - uiPopupBoundsBlock(block, 6.0f, 0, -20); /* move it downwards, mouse over button */ + uiPopupBoundsBlock(block, 6, 0, -20); /* move it downwards, mouse over button */ uiEndBlock(C, block); event= *(win->eventstate); /* XXX huh huh? make api call */ @@ -2728,8 +2728,8 @@ static void wm_radial_control_paint(bContext *C, int x, int y, void *customdata) } glColor4f(rc->col[0], rc->col[1], rc->col[2], rc->col[3]); - glutil_draw_lined_arc(0.0, M_PI*2.0, r1, 40); - glutil_draw_lined_arc(0.0, M_PI*2.0, r2, 40); + glutil_draw_lined_arc(0.0, (float)(M_PI*2.0), r1, 40); + glutil_draw_lined_arc(0.0, (float)(M_PI*2.0), r2, 40); glDisable(GL_BLEND); } -- cgit v1.2.3