Code cleanup: use bools where possible
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user