diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-03 11:55:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-03 12:35:44 +0400 |
commit | d900f5be55d0812eb5c7dfd3ea47020c3edafd41 (patch) | |
tree | 7d5035e3dbafdcd4988e7ed57068e48c951a989a /source/blender/editors/sculpt_paint/paint_vertex.c | |
parent | a948ae2c5167c49819241572d3aacb4e4bf5b6d7 (diff) |
Code cleanup: use bools where possible
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index d6d13decf4d..a1ce39a4833 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -280,12 +280,13 @@ static void do_shared_vertex_tesscol(Mesh *me, bool *mfacetag) MEM_freeN(scolmain); } -static void do_shared_vertexcol(Mesh *me, bool *mlooptag, bool *mfacetag, int do_tessface) +static void do_shared_vertexcol(Mesh *me, bool *mlooptag, bool *mfacetag, const bool do_tessface) { const int use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL); MPoly *mp; int (*scol)[4]; - int i, j, has_shared = 0; + int i, j; + bool has_shared = false; /* if no mloopcol: do not do */ /* if mtexpoly: only the involved faces, otherwise all */ @@ -1464,7 +1465,7 @@ static void multipaint_selection(MDeformVert *dvert, const int defbase_tot, floa static float redistribute_change(MDeformVert *ndv, const int defbase_tot, char *change_status, const char change_me, int changeto, float totchange, float total_valid, - char do_auto_normalize) + bool do_auto_normalize) { bool changed; float change; @@ -1523,7 +1524,7 @@ static float get_mp_change(MDeformVert *odv, const int defbase_tot, const bool * static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, const int defbase_tot, const bool *defbase_sel, const bool *lock_flags, const bool *vgroup_validmap, - char do_auto_normalize, char do_multipaint) + bool do_auto_normalize, bool do_multipaint) { float totchange = 0.0f; float totchange_allowed = 0.0f; @@ -1697,9 +1698,9 @@ typedef struct WeightPaintInfo { const bool *vgroup_validmap; /* same as WeightPaintData.vgroup_validmap, * only added here for convenience */ - char do_flip; - char do_multipaint; - char do_auto_normalize; + bool do_flip; + bool do_multipaint; + bool do_auto_normalize; float brush_alpha_value; /* result of BKE_brush_alpha_get() */ } WeightPaintInfo; |