[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17128] trunk/blender/source/blender/src: A few warnings missed in previous sweep

Joshua Leung aligorith at gmail.com
Mon Oct 20 11:24:25 CEST 2008


Revision: 17128
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17128
Author:   aligorith
Date:     2008-10-20 11:24:25 +0200 (Mon, 20 Oct 2008)

Log Message:
-----------
A few warnings missed in previous sweep

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawaction.c
    trunk/blender/source/blender/src/drawgpencil.c
    trunk/blender/source/blender/src/gpencil.c

Modified: trunk/blender/source/blender/src/drawaction.c
===================================================================
--- trunk/blender/source/blender/src/drawaction.c	2008-10-20 07:08:06 UTC (rev 17127)
+++ trunk/blender/source/blender/src/drawaction.c	2008-10-20 09:24:25 UTC (rev 17128)
@@ -122,7 +122,7 @@
 	 * correctly *grumble*
 	 */
 	mywinset(curarea->win);
-	myortho2(-0.375f, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax);
+	myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
 
     sprintf(str, "actionbuttonswin %d", curarea->win);
     block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS, UI_HELV, curarea->win);
@@ -133,7 +133,7 @@
 	/* make the little 'open the sliders' widget */
 	// should eventually be removed
     BIF_ThemeColor(TH_FACE); // this slot was open... (???... Aligorith)
-	glRects(2,            y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, y + CHANNELHEIGHT + 2);
+	glRects(2, (short)y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, (short)y + CHANNELHEIGHT + 2);
 	glColor3ub(0, 0, 0);
 	glRasterPos2f(4, y + CHANNELHEIGHT + 6);
 	BMF_DrawString(G.font, "Sliders");
@@ -144,7 +144,7 @@
 		ACTWIDTH = NAMEWIDTH;
 		but=uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR, 
 					  ICON_DISCLOSURE_TRI_RIGHT,
-					  NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
+					  NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
 					  XIC,YIC-2,
 					  &(G.saction->flag), 0, 0, 0, 0, 
 					  "Show action window sliders");
@@ -155,7 +155,7 @@
 	else {
 		but= uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR, 
 					  ICON_DISCLOSURE_TRI_DOWN,
-					  NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
+					  NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
 					  XIC,YIC-2,
 					  &(G.saction->flag), 0, 0, 0, 0, 
 					  "Hide action window sliders");
@@ -171,7 +171,7 @@
 		uiBlockSetEmboss(block, UI_EMBOSS);
 		for (i=1; i < key->totkey; i++) {
 			make_rvk_slider(block, ob, i, 
-							x, y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
+							(int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
 			
 			y-=CHANNELHEIGHT+CHANNELSKIP;
 			
@@ -294,7 +294,7 @@
 	 * correctly *grumble*
 	 */
 	mywinset(curarea->win);
-	myortho2(-0.375, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax);
+	myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
 	
     sprintf(str, "actionbuttonswin %d", curarea->win);
     block= uiNewBlock (&curarea->uiblocks, str, 
@@ -318,7 +318,7 @@
 		
 		/* draw backdrop first */
 		BIF_ThemeColor(TH_FACE); // change this color... it's ugly
-		glRects(NAMEWIDTH,  G.v2d->cur.ymin,  NAMEWIDTH+SLIDERWIDTH,  G.v2d->cur.ymax);
+		glRects(NAMEWIDTH,  (short)G.v2d->cur.ymin,  NAMEWIDTH+SLIDERWIDTH,  (short)G.v2d->cur.ymax);
 		
 		uiBlockSetEmboss(block, UI_EMBOSS);
 		for (ale= act_data.first; ale; ale= ale->next) {
@@ -339,7 +339,7 @@
 						/* only show if action channel is selected */
 						if (SEL_ACHAN(achan)) {
 							make_icu_slider(block, icu,
-											x, y, SLIDERWIDTH-2, CHANNELHEIGHT-2, 
+											(int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2, 
 											"Slider to control current value of Constraint Influence");
 						}
 					}
@@ -352,7 +352,7 @@
 						/* only show if action channel is selected */
 						if (SEL_ACHAN(achan)) {
 							make_icu_slider(block, icu,
-											x, y, SLIDERWIDTH-2, CHANNELHEIGHT-2, 
+											(int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2, 
 											"Slider to control current value of IPO-Curve");
 						}
 					}
@@ -383,7 +383,7 @@
 	float vec[2];
 	
 	/* Draw a light green line to indicate current frame */
-	vec[0]= (G.scene->r.cfra);
+	vec[0]= (float)(G.scene->r.cfra);
 	vec[0]*= G.scene->r.framelen;
 	
 	vec[1]= G.v2d->cur.ymin;
@@ -820,13 +820,13 @@
 			/* draw protect 'lock' */
 			if (protect > -1) {
 				offset = 16;
-				BIF_icon_draw(NAMEWIDTH-offset, yminc, protect);
+				BIF_icon_draw((float)NAMEWIDTH-offset, yminc, protect);
 			}
 			
 			/* draw mute 'eye' */
 			if (mute > -1) {
 				offset += 16;
-				BIF_icon_draw(NAMEWIDTH-offset, yminc, mute);
+				BIF_icon_draw((float)(NAMEWIDTH-offset), yminc, mute);
 			}
 		}
 		
@@ -838,7 +838,7 @@
 	BLI_freelistN(&act_data);
 	
 	/* re-adjust view matrices for correct scaling */
-    myortho2(0,	NAMEWIDTH, 0, (ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin));	//	Scaling
+    myortho2(0,	NAMEWIDTH, 0, (float)(ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin));	//	Scaling
 }
 
 /* sets or clears hidden flags */
@@ -969,7 +969,7 @@
 					if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
 					else glColor4ub(col2[0], col2[1], col2[2], 0x22);
 				}
-				glRectf(frame1_x,  channel_y-CHANNELHEIGHT/2,  G.v2d->hor.xmax,  channel_y+CHANNELHEIGHT/2);
+				glRectf((float)frame1_x,  (float)channel_y-CHANNELHEIGHT/2,  (float)G.v2d->hor.xmax,  (float)channel_y+CHANNELHEIGHT/2);
 				
 				if (ale->datatype == ALE_GROUP) {
 					if (sel) glColor4ub(col1a[0], col1a[1], col1a[2], 0x22);
@@ -979,7 +979,7 @@
 					if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
 					else glColor4ub(col2[0], col2[1], col2[2], 0x22);
 				}
-				glRectf(act_start,  channel_y-CHANNELHEIGHT/2,  act_end,  channel_y+CHANNELHEIGHT/2);
+				glRectf((float)act_start,  (float)channel_y-CHANNELHEIGHT/2,  (float)act_end,  (float)channel_y+CHANNELHEIGHT/2);
 			}
 			else if (datatype == ACTCONT_SHAPEKEY) {
 				gla2DDrawTranslatePt(di, 1, y, &frame1_x, &channel_y);
@@ -988,11 +988,11 @@
 				 * get a desaturated orange background
 				 */
 				glColor4ub(col2[0], col2[1], col2[2], 0x22);
-				glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2);
+				glRectf(0.0f, (float)channel_y-CHANNELHEIGHT/2, (float)frame1_x, (float)channel_y+CHANNELHEIGHT/2);
 				
 				/* frames one and higher get a saturated orange background */
 				glColor4ub(col2[0], col2[1], col2[2], 0x44);
-				glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax,  channel_y+CHANNELHEIGHT/2);
+				glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax,  (float)channel_y+CHANNELHEIGHT/2.0f);
 			}
 			else if (datatype == ACTCONT_GPENCIL) {
 				gla2DDrawTranslatePt(di, G.v2d->cur.xmin, y, &frame1_x, &channel_y);
@@ -1000,12 +1000,12 @@
 				/* frames less than one get less saturated background */
 				if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
 				else glColor4ub(col2[0], col2[1], col2[2], 0x22);
-				glRectf(0, channel_y-CHANNELHEIGHT/2, frame1_x, channel_y+CHANNELHEIGHT/2);
+				glRectf(0.0f, (float)channel_y-CHANNELHEIGHT/2, (float)frame1_x, (float)channel_y+CHANNELHEIGHT/2);
 				
 				/* frames one and higher get a saturated background */
 				if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x44);
 				else glColor4ub(col2[0], col2[1], col2[2], 0x44);
-				glRectf(frame1_x, channel_y-CHANNELHEIGHT/2, G.v2d->hor.xmax,  channel_y+CHANNELHEIGHT/2);
+				glRectf((float)frame1_x, (float)channel_y-CHANNELHEIGHT/2, (float)G.v2d->hor.xmax,  (float)channel_y+CHANNELHEIGHT/2);
 			}
 		}
 		
@@ -1061,8 +1061,8 @@
 		cpack(0x0);
 		
 		glBegin(GL_LINES);
-		glVertex2f(frame1_x, G.v2d->mask.ymin - 100);
-		glVertex2f(frame1_x, G.v2d->mask.ymax);
+		glVertex2f((float)frame1_x, (float)G.v2d->mask.ymin - 100);
+		glVertex2f((float)frame1_x, (float)G.v2d->mask.ymax);
 		glEnd();
 	}
 	
@@ -1335,7 +1335,7 @@
 	/* Draw scroll */
 	mywinset(curarea->win);	// reset scissor too
 	if (curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
-		myortho2(-0.375f, curarea->winx-0.375, -0.375f, curarea->winy-0.375);
+		myortho2(-0.375f, curarea->winx-0.375f, -0.375f, curarea->winy-0.375f);
 		if (G.v2d->scroll) drawscroll(0);
 	}
 
@@ -1361,7 +1361,7 @@
 	}
 	
 	mywinset(curarea->win);	// reset scissor too
-	myortho2(-0.375f, curarea->winx-0.375, -0.375f, curarea->winy-0.375);
+	myortho2(-0.375f, curarea->winx-0.375f, -0.375f, curarea->winy-0.375f);
 	draw_area_emboss(sa);
 
 	/* it is important to end a view in a transform compatible with buttons */
@@ -1584,7 +1584,7 @@
 					BIF_ThemeColor4(TH_STRIP_SELECT);
 				else
 					BIF_ThemeColor4(TH_STRIP);
-				glRectf(sc_xa,  sc_ya-3,  sc_xb,  sc_yb+5);
+				glRectf((float)sc_xa, (float)sc_ya-3, (float)sc_xb, (float)sc_yb+5);
 			}
 		}
 	}

Modified: trunk/blender/source/blender/src/drawgpencil.c
===================================================================
--- trunk/blender/source/blender/src/drawgpencil.c	2008-10-20 07:08:06 UTC (rev 17127)
+++ trunk/blender/source/blender/src/drawgpencil.c	2008-10-20 09:24:25 UTC (rev 17128)
@@ -187,7 +187,7 @@
 		/* rounded header */
 		if (active) uiBlockSetCol(block, TH_BUT_ACTION);
 			rb_col= (active)?-20:20;
-			uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15, rb_col-20, ""); 
+			uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), ""); 
 		if (active) uiBlockSetCol(block, TH_AUTO);
 		
 		/* lock toggle */
@@ -243,7 +243,7 @@
 		
 		/* draw backdrop */
 		if (active) uiBlockSetCol(block, TH_BUT_ACTION);
-			uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-8, *yco-height, width, height-1, NULL, 5.0, 0.0, 12, rb_col, ""); 
+			uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-8, *yco-height, width, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, ""); 
 		if (active) uiBlockSetCol(block, TH_AUTO);
 		
 		/* draw settings */
@@ -794,7 +794,7 @@
 		QUATCOPY(color, gpl->color); // just for copying 4 array elements
 		QUATCOPY(tcolor, gpl->color); // additional copy of color (for ghosting)
 		glColor4f(color[0], color[1], color[2], color[3]);
-		glPointSize(gpl->thickness + 2);
+		glPointSize((float)(gpl->thickness + 2));
 		
 		/* draw 'onionskins' (frame left + right) */
 		if (gpl->flag & GP_LAYER_ONIONSKIN) {
@@ -952,7 +952,7 @@
 			float zoom, zoomx, zoomy;
 			
 			/* calculate accessory values */
-			zoom= (float)SEQ_ZOOM_FAC(sseq->zoom);
+			zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom));
 			if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
 				zoomx = zoom * ((float)G.scene->r.xasp / (float)G.scene->r.yasp);
 				zoomy = zoom;

Modified: trunk/blender/source/blender/src/gpencil.c
===================================================================
--- trunk/blender/source/blender/src/gpencil.c	2008-10-20 07:08:06 UTC (rev 17127)
+++ trunk/blender/source/blender/src/gpencil.c	2008-10-20 09:24:25 UTC (rev 17128)
@@ -1879,7 +1879,7 @@
 				p->gpd->sbuffer_sflag |= GP_STROKE_2DIMAGE;
 				
 				/* calculate zoom factor */

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list