diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-27 07:54:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-27 07:54:23 +0400 |
commit | 397d7d949f1d6e7b83aacff40a14f60d8af167b7 (patch) | |
tree | 64895908ad17f27d9934eb04d56f522ff35a8157 /source/blender/modifiers | |
parent | 8d92e140881b02c6cac5fbb780f06c5cccdd73f7 (diff) |
remove unneeded casts from 'unsigned int' to 'int'
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_mirror.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_screw.c | 18 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index c72a76f0101..8a003256ff2 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -266,7 +266,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, } /* Flip face normal */ - SWAP(int, mf2->v1, mf2->v3); + SWAP(unsigned int, mf2->v1, mf2->v3); DM_swap_face_data(result, numFaces, corner_indices); test_index_face(mf2, &result->faceData, numFaces, inMF.v4?4:3); diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index 0867a4b2a7b..93abbb1780c 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -145,12 +145,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, int mface_index=0; int step; int i, j; - int i1,i2; + unsigned int i1, i2; int step_tot= useRenderParams ? ltmd->render_steps : ltmd->steps; const int do_flip = ltmd->flag & MOD_SCREW_NORMAL_FLIP ? 1 : 0; int maxVerts=0, maxEdges=0, maxFaces=0; - int totvert= dm->getNumVerts(dm); - int totedge= dm->getNumEdges(dm); + const unsigned int totvert= dm->getNumVerts(dm); + const unsigned int totedge= dm->getNumEdges(dm); char axis_char= 'X', close; float angle= ltmd->angle; @@ -571,7 +571,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, if (lt_iter.v == lt_iter.e->v1) { if (ed_loop_flip == 0) { /*printf("\t\t\tFlipping 0\n");*/ - SWAP(int, lt_iter.e->v1, lt_iter.e->v2); + SWAP(unsigned int, lt_iter.e->v1, lt_iter.e->v2); }/* else { printf("\t\t\tFlipping Not 0\n"); }*/ @@ -579,7 +579,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, else if (lt_iter.v == lt_iter.e->v2) { if (ed_loop_flip == 1) { /*printf("\t\t\tFlipping 1\n");*/ - SWAP(int, lt_iter.e->v1, lt_iter.e->v2); + SWAP(unsigned int, lt_iter.e->v1, lt_iter.e->v2); }/* else { printf("\t\t\tFlipping Not 1\n"); }*/ @@ -771,8 +771,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } if( !mf_new->v3 || !mf_new->v4 ) { - SWAP(int, mf_new->v1, mf_new->v3); - SWAP(int, mf_new->v2, mf_new->v4); + SWAP(unsigned int, mf_new->v1, mf_new->v3); + SWAP(unsigned int, mf_new->v2, mf_new->v4); } mf_new->flag= ME_SMOOTH; origindex[mface_index]= ORIGINDEX_NONE; @@ -807,8 +807,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } if( !mf_new->v3 || !mf_new->v4 ) { - SWAP(int, mf_new->v1, mf_new->v3); - SWAP(int, mf_new->v2, mf_new->v4); + SWAP(unsigned int, mf_new->v1, mf_new->v3); + SWAP(unsigned int, mf_new->v2, mf_new->v4); } mf_new->flag= ME_SMOOTH; origindex[mface_index]= ORIGINDEX_NONE; diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index d11d10eb71b..2aa69526c10 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -350,7 +350,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, { static int corner_indices[4] = {2, 1, 0, 3}; - int is_quad; + unsigned int is_quad; for(i=0, mf=mface+numFaces; i<numFaces; i++, mf++) { mf->v1 += numVerts; @@ -362,7 +362,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, /* Flip face normal */ { is_quad = mf->v4; - SWAP(int, mf->v1, mf->v3); + SWAP(unsigned int, mf->v1, mf->v3); DM_swap_face_data(result, i+numFaces, corner_indices); test_index_face(mf, &result->faceData, numFaces, is_quad ? 4:3); } |