Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-01-02 09:03:53 +0300
committerJoshua Leung <aligorith@gmail.com>2009-01-02 09:03:53 +0300
commit95753c04f5265d9da375366038ed7e64cb40e9df (patch)
tree6c8f3a67b9ce72ad37bd3d654d5821a50d15f397 /source/blender/editors
parent983282175084607242ba36d9e17dfcd398bce642 (diff)
2.5 - Silencing more MSVC warnings
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_draw.c2
-rw-r--r--source/blender/editors/animation/keyframes_edit.c6
-rw-r--r--source/blender/editors/interface/view2d_ops.c2
-rw-r--r--source/blender/editors/space_action/action_draw.c4
-rw-r--r--source/blender/editors/space_action/action_edit.c4
-rw-r--r--source/blender/editors/space_action/action_header.c2
-rw-r--r--source/blender/editors/space_action/action_select.c4
-rw-r--r--source/blender/editors/space_ipo/space_ipo.c2
8 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 91daa6bf541..e7d803e438a 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -85,7 +85,7 @@ static void draw_cfra_number (Scene *scene, View2D *v2d, float cfra, short time)
sprintf(str, " %.2f", FRA2TIME(CFRA));
else
sprintf(str, " %d", CFRA);
- slen= UI_GetStringWidth(G.font, str, 0) - 1;
+ slen= (short)UI_GetStringWidth(G.font, str, 0) - 1;
/* get starting coordinates for drawing */
x= cfra * xscale;
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index e6ccc7b9105..3b41da56b50 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -247,10 +247,10 @@ static short snap_bezier_nearest(BeztEditData *bed, BezTriple *bezt)
static short snap_bezier_nearestsec(BeztEditData *bed, BezTriple *bezt)
{
const Scene *scene= bed->scene;
- const float secf = FPS;
+ const float secf = (float)FPS;
if (bezt->f2 & SELECT)
- bezt->vec[1][0]= (float)(floor(bezt->vec[1][0]/secf + 0.5f) * secf);
+ bezt->vec[1][0]= ((float)floor(bezt->vec[1][0]/secf + 0.5f) * secf);
return 0;
}
@@ -398,7 +398,7 @@ void snap_cfra_ipo_keys(BeztEditData *bed, Ipo *ipo, short mode)
for (icu= ipo->curve.first; icu; icu= icu->next) {
for (a=0, bezt=icu->bezt; a < icu->totvert; a++, bezt++) {
if (BEZSELECTED(bezt)) {
- cfra += bezt->vec[1][0];
+ cfra += (int)floor(bezt->vec[1][0] + 0.5f);
tot++;
}
}
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 4352f64ff47..ef3a9f760c8 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -728,7 +728,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
/* y-axis transform */
dist = (v2d->mask.ymax - v2d->mask.ymin) / 2.0f;
- dy= 1.0f - ((float)fabs(vzd->lasty - dist) + 2.0) / ((float)fabs(event->y - dist) + 2.0f);
+ dy= 1.0f - ((float)fabs(vzd->lasty - dist) + 2.0f) / ((float)fabs(event->y - dist) + 2.0f);
dy*= 0.5f * (v2d->cur.ymax - v2d->cur.ymin);
}
else {
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 8db623c7267..a3ec3a65af0 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -422,7 +422,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
- v2d->tot.ymin= -height;
+ v2d->tot.ymin= (float)(-height);
}
/* loop through channels, and set up drawing depending on their type */
@@ -1152,7 +1152,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
- v2d->tot.ymin= -height;
+ v2d->tot.ymin= (float)(-height);
}
/* first backdrop strips */
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index d6c0fdcef37..9522ce04abf 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -205,7 +205,7 @@ static int actkeys_viewall_exec(bContext *C, wmOperator *op)
/* set vertical range */
v2d->cur.ymax= 0.0f;
- v2d->cur.ymin= -(v2d->mask.ymax - v2d->mask.ymin);
+ v2d->cur.ymin= (float)-(v2d->mask.ymax - v2d->mask.ymin);
/* do View2D syncing */
UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
@@ -1307,7 +1307,7 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
/* store marker's time (if available) */
if (marker)
- bed.f1= marker->frame;
+ bed.f1= (float)marker->frame;
else
return;
}
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index dbcdc0adb1e..406c9bf2147 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -626,7 +626,7 @@ void action_header_buttons(const bContext *C, ARegion *ar)
}
/* always as last */
- UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
+ UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, (int)(ar->v2d.tot.ymax-ar->v2d.tot.ymin));
uiEndBlock(C, block);
uiDrawBlock(C, block);
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 7cb1912f321..231f53a6171 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -549,8 +549,8 @@ static void markers_selectkeys_between (bAnimContext *ac)
/* get extreme markers */
//get_minmax_markers(1, &min, &max); // FIXME... add back markers api!
- min= ac->scene->r.sfra; // xxx temp code
- max= ac->scene->r.efra; // xxx temp code
+ min= (float)ac->scene->r.sfra; // xxx temp code
+ max= (float)ac->scene->r.efra; // xxx temp code
if (min==max) return;
min -= 0.5f;
diff --git a/source/blender/editors/space_ipo/space_ipo.c b/source/blender/editors/space_ipo/space_ipo.c
index 8a301378fd7..1c7dadcb296 100644
--- a/source/blender/editors/space_ipo/space_ipo.c
+++ b/source/blender/editors/space_ipo/space_ipo.c
@@ -96,7 +96,7 @@ static SpaceLink *ipo_new(const bContext *C)
ar->v2d.tot.xmin= 0.0f;
ar->v2d.tot.ymin= -10.0f;
- ar->v2d.tot.xmax= scene->r.efra;
+ ar->v2d.tot.xmax= (float)scene->r.efra;
ar->v2d.tot.ymax= 10.0f;
ar->v2d.cur= ar->v2d.tot;