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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-30 14:47:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-30 14:47:32 +0400
commit8f3ed0501e78d62b2b507d5befb454a5c98375d2 (patch)
treef4274bc09b14b9ba0e3becadfb35b3fba801c792 /source/blender/bmesh
parent59798937110dea84d65339d5883fcdd9c1666ca5 (diff)
code cleanup: quiet clang warnings, these would likely never but wont hurt to quiet them,
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_hull.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c
index 09ccbfec1b1..106c629841b 100644
--- a/source/blender/bmesh/operators/bmo_hull.c
+++ b/source/blender/bmesh/operators/bmo_hull.c
@@ -424,7 +424,8 @@ static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op,
}
/* 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 @@ static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op,
/* 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 @@ static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op,
}
}
- 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 @@ static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op,
}
}
- 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;