diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-20 07:48:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-20 07:48:32 +0400 |
commit | bfcd1afe9c810621eef534832973dcd06010b388 (patch) | |
tree | 1b65222594e3892551b7f8c41ce99e3e925b8444 /source/blender/blenkernel | |
parent | b163e19b8df818becbd97c57a55c5a4e0e900da1 (diff) |
compile fix: linux BLI_gzopen declare was conflicting.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 37c551a05b7..97780a30a5c 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -262,23 +262,24 @@ void defvert_flip(MDeformVert *dvert, const int *flip_map, const int flip_map_le void defvert_flip_merged(MDeformVert *dvert, const int *flip_map, const int flip_map_len) { - MDeformWeight *dw, *copydw; + MDeformWeight *dw, *dw_cpy; float weight; int i, totweight = dvert->totweight; /* copy weights */ - for (dw= dvert->dw, i=0; i<totweight; dw++, i++) { + for (dw = dvert->dw, i=0; i < totweight; dw++, i++) { if (dw->def_nr < flip_map_len) { if (flip_map[dw->def_nr] >= 0) { - copydw= defvert_verify_index(dvert, flip_map[dw->def_nr]); - dw= &dvert->dw[i]; /* in case array got realloced */ + /* error checkers complain of this but we'll never get NULL return */ + dw_cpy = defvert_verify_index(dvert, flip_map[dw->def_nr]); + dw = &dvert->dw[i]; /* in case array got realloced */ /* distribute weights: if only one of the vertex groups was - assigned this will halve the weights, otherwise it gets - evened out. this keeps it proportional to other groups */ - weight = 0.5f*(copydw->weight + dw->weight); - copydw->weight= weight; - dw->weight= weight; + * assigned this will halve the weights, otherwise it gets + * evened out. this keeps it proportional to other groups */ + weight = 0.5f * (dw_cpy->weight + dw->weight); + dw_cpy->weight = weight; + dw->weight = weight; } } } |