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>2013-03-17 14:26:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-17 14:26:23 +0400
commit0d0291f6e18a2b8357053bf8166220464beab138 (patch)
treea8a076d5351c643a484e9b099d26d8c89a303ab4 /source/blender/modifiers
parent1174c7d6628de721052190167e249f251a8bbbe5 (diff)
code cleanup: incorrect sized array args, remove some redundant code.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_array.c2
-rw-r--r--source/blender/modifiers/intern/MOD_laplaciansmooth.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 3ca2c364345..bc65b27be0c 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -338,7 +338,6 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
/* offset matrix */
float offset[4][4];
float final_offset[4][4];
- float tmp_mat[4][4];
float length = amd->length;
int count = amd->count, maxVerts;
int *indexMap = NULL;
@@ -418,6 +417,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
unit_m4(final_offset);
for (j = 0; j < count - 1; j++) {
+ float tmp_mat[4][4];
mult_m4_m4m4(tmp_mat, offset, final_offset);
copy_m4_m4(final_offset, tmp_mat);
}
diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
index b2ca1b0d79e..743cd1a829e 100644
--- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c
+++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
@@ -100,7 +100,6 @@ static void delete_void_pointer(void *data)
{
if (data) {
MEM_freeN(data);
- data = NULL;
}
}
@@ -242,7 +241,7 @@ static CustomDataMask required_data_mask(Object *UNUSED(ob), ModifierData *md)
static float average_area_quad_v3(float *v1, float *v2, float *v3, float *v4)
{
- float areaq = 0.0f;
+ float areaq;
areaq = area_tri_v3(v1, v2, v3) + area_tri_v3(v1, v2, v4) + area_tri_v3(v1, v3, v4);
return areaq / 2.0f;
}