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-10-29 19:43:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-29 19:43:54 +0400
commiteb69d1c1ae0e088d86b25c46f9a99d4c08c7ede1 (patch)
treee6919338ec3c6d8ace44a71ec119bf860294c29d /source/blender/modifiers
parent76288fad8cb09567f31804536ba687997898b3e5 (diff)
style cleanup: also quiet harmless compiler warning.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_array.c10
-rw-r--r--source/blender/modifiers/intern/MOD_mask.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 7b699e5633c..b9dd37ac50c 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -314,7 +314,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
BMesh *bm = DM_to_bmesh(dm);
BMOperator first_dupe_op, dupe_op, old_dupe_op, weld_op;
BMVert **first_geom = NULL;
- int i, j, indexLen;
+ int i, j;
+ int index_len = -1; /* initialize to an invalid value */
/* offset matrix */
float offset[4][4];
float final_offset[4][4];
@@ -452,12 +453,15 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
/*calculate merge mapping*/
if (j == 0) {
indexMap = find_doubles_index_map(bm, &dupe_op,
- amd, &indexLen);
+ amd, &index_len);
}
#define _E(s, i) ((BMVert **)(s)->data.buf)[i]
- for (i = 0; i < indexLen; i++) {
+ /* ensure this is set */
+ BLI_assert(index_len != -1);
+
+ for (i = 0; i < index_len; i++) {
if (!indexMap[i]) continue;
/* merge v (from 'newout') into v2 (from old 'geom') */
diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c
index f845f1d9dc7..23ce8cdeb21 100644
--- a/source/blender/modifiers/intern/MOD_mask.c
+++ b/source/blender/modifiers/intern/MOD_mask.c
@@ -179,7 +179,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
/* verthash gives mapping from original vertex indices to the new indices (including selected matches only)
- * key=oldindex, value=newindex
+ * key = oldindex, value = newindex
*/
vertHash = BLI_ghash_int_new("mask vert gh");