diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-17 13:58:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-17 13:58:26 +0400 |
commit | f5f25b81e8963aeba0a4c09f09358de070e0f927 (patch) | |
tree | c7fd6345d3a372845a0621e90087f88c90e4b8b8 /source/blender/blenkernel/intern/cloth.c | |
parent | 245c94a75e60c2c0b58c1f39d189258e2e424e29 (diff) |
style cleanup:
also fix for building ghost test and fix double free in one of the tests
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index b681426f8a7..a0cca25a841 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1007,7 +1007,7 @@ int cloth_add_spring(ClothModifierData *clmd, unsigned int indexA, unsigned int if (cloth) { // TODO: look if this spring is already there - spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); if (!spring) return 0; @@ -1079,7 +1079,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) cloth->springs = NULL; - edgelist = MEM_callocN ( sizeof ( LinkNode * ) * numverts, "cloth_edgelist_alloc" ); + edgelist = MEM_callocN ( sizeof (LinkNode *) * numverts, "cloth_edgelist_alloc" ); if (!edgelist) return 0; @@ -1096,7 +1096,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) // structural springs for ( i = 0; i < numedges; i++ ) { - spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); if ( spring ) { spring->ij = MIN2(medge[i].v1, medge[i].v2); @@ -1154,7 +1154,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) // if ( mface[i].v4 ) --> Quad face - spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); if (!spring) { cloth_free_errorsprings(cloth, edgehash, edgelist); @@ -1192,7 +1192,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) if (!BLI_edgehash_haskey(edgehash, MIN2(tspring2->ij, index2), MAX2(tspring2->ij, index2)) && (index2 != tspring2->ij)) { - spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); if (!spring) { cloth_free_errorsprings(cloth, edgehash, edgelist); @@ -1229,7 +1229,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) tspring2 = search2->link; if (tspring->ij == tspring2->kl) { - spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); if (!spring) { cloth_free_errorsprings(cloth, edgehash, edgelist); |