[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46107] trunk/blender/source/blender/bmesh /operators/bmo_hull.c: code cleanup: quiet clang warnings, these would likely never but wont hurt to quiet them,
Campbell Barton
ideasman42 at gmail.com
Mon Apr 30 12:47:32 CEST 2012
Revision: 46107
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46107
Author: campbellbarton
Date: 2012-04-30 10:47:32 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
code cleanup: quiet clang warnings, these would likely never but wont hurt to quiet them,
Modified Paths:
--------------
trunk/blender/source/blender/bmesh/operators/bmo_hull.c
Modified: trunk/blender/source/blender/bmesh/operators/bmo_hull.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_hull.c 2012-04-30 10:39:35 UTC (rev 46106)
+++ trunk/blender/source/blender/bmesh/operators/bmo_hull.c 2012-04-30 10:47:32 UTC (rev 46107)
@@ -424,7 +424,8 @@
}
/* Find widest axis */
- widest_axis_len = 0;
+ widest_axis_len = 0.0f;
+ widest_axis = 0; /* set here in the unlikey case this isn't set below */
for (i = 0; i < 3; i++) {
float len = (max[i]->co[i] - min[i]->co[i]);
if (len >= widest_axis_len) {
@@ -441,6 +442,7 @@
/* Choose third vertex farthest from existing line segment */
largest_dist = 0;
+ tetra[2] = NULL;
for (i = 0; i < 3; i++) {
BMVert *v;
float dist;
@@ -460,7 +462,13 @@
}
}
- BMO_elem_flag_enable(bm, tetra[2], HULL_FLAG_TETRA_VERT);
+ if (tetra[2]) {
+ BMO_elem_flag_enable(bm, tetra[2], HULL_FLAG_TETRA_VERT);
+ }
+ else {
+ return TRUE;
+ }
+
/* Check for colinear vertices */
if (largest_dist < 0.0001)
return TRUE;
@@ -478,7 +486,13 @@
}
}
- BMO_elem_flag_enable(bm, tetra[3], HULL_FLAG_TETRA_VERT);
+ if (tetra[3]) {
+ BMO_elem_flag_enable(bm, tetra[3], HULL_FLAG_TETRA_VERT);
+ }
+ else {
+ return TRUE;
+ }
+
if (largest_dist < 0.0001)
return TRUE;
More information about the Bf-blender-cvs
mailing list