Code cleanup: use bools where possible

This commit is contained in:
2014-02-03 18:55:59 +11:00
parent a948ae2c51
commit d900f5be55
170 changed files with 526 additions and 510 deletions

View File

@@ -244,8 +244,8 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne
* vertex index (in case the weight array does not cover the whole vertices...).
*/
void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, int num,
const int *indices, const float *weights, int do_add,
float add_thresh, int do_rem, float rem_thresh)
const int *indices, const float *weights, const bool do_add,
const float add_thresh, const bool do_rem, const float rem_thresh)
{
int i;

View File

@@ -80,7 +80,7 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne
* vertex index (in case the weight table does not cover the whole vertices...).
*/
void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, int num,
const int *indices, const float *weights, int do_add,
float add_thresh, int do_rem, float rem_thresh);
const int *indices, const float *weights, const bool do_add,
const float add_thresh, const bool do_rem, const float rem_thresh);
#endif /* __MOD_WEIGHTVG_UTIL_H__ */

View File

@@ -184,11 +184,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
int defgrp_index;
int i;
/* Flags. */
int do_add = (wmd->edit_flags & MOD_WVG_EDIT_ADD2VG) != 0;
int do_rem = (wmd->edit_flags & MOD_WVG_EDIT_REMFVG) != 0;
const bool do_add = (wmd->edit_flags & MOD_WVG_EDIT_ADD2VG) != 0;
const bool do_rem = (wmd->edit_flags & MOD_WVG_EDIT_REMFVG) != 0;
/* Only do weight-preview in Object, Sculpt and Pose modes! */
#if 0
int do_prev = (wmd->modifier.mode & eModifierMode_DoWeightPreview);
const bool do_prev = (wmd->modifier.mode & eModifierMode_DoWeightPreview);
#endif
/* Get number of verts. */