Revision: 58961
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58961
Author:   campbellbarton
Date:     2013-08-06 06:38:52 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
quiet double-promotion warnings, change octree.cpp to use a float (vector 
accumulated into a float anyway)

Modified Paths:
--------------
    trunk/blender/intern/dualcon/intern/octree.cpp
    trunk/blender/source/blender/editors/space_view3d/drawobject.c
    trunk/blender/source/blender/editors/space_view3d/drawvolume.c

Modified: trunk/blender/intern/dualcon/intern/octree.cpp
===================================================================
--- trunk/blender/intern/dualcon/intern/octree.cpp      2013-08-06 06:36:34 UTC 
(rev 58960)
+++ trunk/blender/intern/dualcon/intern/octree.cpp      2013-08-06 06:38:52 UTC 
(rev 58961)
@@ -2182,7 +2182,7 @@
                        ata[4] += (float)(norm[1] * norm[2]);
                        ata[5] += (float)(norm[2] * norm[2]);
 
-                       double pn = p[0] * norm[0] + p[1] * norm[1] + p[2] * 
norm[2];
+                       const float pn = p[0] * norm[0] + p[1] * norm[1] + p[2] 
* norm[2];
 
                        atb[0] += (float)(norm[0] * pn);
                        atb[1] += (float)(norm[1] * pn);

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c      
2013-08-06 06:36:34 UTC (rev 58960)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c      
2013-08-06 06:38:52 UTC (rev 58961)
@@ -7056,12 +7056,12 @@
                                /* set dynamic boundaries to draw the volume
                                 * also scale cube to global space to equalize 
volume slicing on all axises
                                 *  (its scaled back before drawing) */
-                               p0[0] = (sds->p0[0] + sds->cell_size[0] * 
sds->res_min[0] + sds->obj_shift_f[0]) * fabs(ob->size[0]);
-                               p0[1] = (sds->p0[1] + sds->cell_size[1] * 
sds->res_min[1] + sds->obj_shift_f[1]) * fabs(ob->size[1]);
-                               p0[2] = (sds->p0[2] + sds->cell_size[2] * 
sds->res_min[2] + sds->obj_shift_f[2]) * fabs(ob->size[2]);
-                               p1[0] = (sds->p0[0] + sds->cell_size[0] * 
sds->res_max[0] + sds->obj_shift_f[0]) * fabs(ob->size[0]);
-                               p1[1] = (sds->p0[1] + sds->cell_size[1] * 
sds->res_max[1] + sds->obj_shift_f[1]) * fabs(ob->size[1]);
-                               p1[2] = (sds->p0[2] + sds->cell_size[2] * 
sds->res_max[2] + sds->obj_shift_f[2]) * fabs(ob->size[2]);
+                               p0[0] = (sds->p0[0] + sds->cell_size[0] * 
sds->res_min[0] + sds->obj_shift_f[0]) * fabsf(ob->size[0]);
+                               p0[1] = (sds->p0[1] + sds->cell_size[1] * 
sds->res_min[1] + sds->obj_shift_f[1]) * fabsf(ob->size[1]);
+                               p0[2] = (sds->p0[2] + sds->cell_size[2] * 
sds->res_min[2] + sds->obj_shift_f[2]) * fabsf(ob->size[2]);
+                               p1[0] = (sds->p0[0] + sds->cell_size[0] * 
sds->res_max[0] + sds->obj_shift_f[0]) * fabsf(ob->size[0]);
+                               p1[1] = (sds->p0[1] + sds->cell_size[1] * 
sds->res_max[1] + sds->obj_shift_f[1]) * fabsf(ob->size[1]);
+                               p1[2] = (sds->p0[2] + sds->cell_size[2] * 
sds->res_max[2] + sds->obj_shift_f[2]) * fabsf(ob->size[2]);
 
                                if (!sds->wt || !(sds->viewsettings & 
MOD_SMOKE_VIEW_SHOWBIG)) {
                                        smd->domain->tex = NULL;

Modified: trunk/blender/source/blender/editors/space_view3d/drawvolume.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawvolume.c      
2013-08-06 06:36:34 UTC (rev 58960)
+++ trunk/blender/source/blender/editors/space_view3d/drawvolume.c      
2013-08-06 06:38:52 UTC (rev 58961)
@@ -461,7 +461,9 @@
                                glTexCoord3d((points[i * 3 + 0] - min[0]) * 
cor[0] / size[0],
                                             (points[i * 3 + 1] - min[1]) * 
cor[1] / size[1],
                                             (points[i * 3 + 2] - min[2]) * 
cor[2] / size[2]);
-                               glVertex3f(points[i * 3 + 0] / 
fabs(ob->size[0]), points[i * 3 + 1] / fabs(ob->size[1]), points[i * 3 + 2] / 
fabs(ob->size[2]));
+                               glVertex3f(points[i * 3 + 0] / 
fabsf(ob->size[0]),
+                                          points[i * 3 + 1] / 
fabsf(ob->size[1]),
+                                          points[i * 3 + 2] / 
fabsf(ob->size[2]));
                        }
                        glEnd();
 
@@ -474,7 +476,9 @@
                                glTexCoord3d((points[i * 3 + 0] - min[0]) * 
cor[0] / size[0],
                                             (points[i * 3 + 1] - min[1]) * 
cor[1] / size[1],
                                             (points[i * 3 + 2] - min[2]) * 
cor[2] / size[2]);
-                               glVertex3f(points[i * 3 + 0] / 
fabs(ob->size[0]), points[i * 3 + 1] / fabs(ob->size[1]), points[i * 3 + 2] / 
fabs(ob->size[2]));
+                               glVertex3f(points[i * 3 + 0] / 
fabsf(ob->size[0]),
+                                          points[i * 3 + 1] / 
fabsf(ob->size[1]),
+                                          points[i * 3 + 2] / 
fabsf(ob->size[2]));
                        }
                        glEnd();
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to