diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-11 05:25:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-11 05:33:29 +0400 |
commit | a15b3c4d111613993eca23d5f99600c2052469e7 (patch) | |
tree | 18d4bcd4291013ecf12a24def023d6f7a73ebd65 /source/blender/editors/sculpt_paint | |
parent | 52af5fa31fbc0a1855a28d957d4387e5d6a15170 (diff) |
Code cleanup: use bool
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 10 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 4cf59a575b9..2f4caeeef1b 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -808,7 +808,7 @@ void ED_space_image_paint_update(wmWindowManager *wm, ToolSettings *settings) wmWindow *win; ScrArea *sa; ImagePaintSettings *imapaint = &settings->imapaint; - int enabled = false; + bool enabled = false; for (win = wm->windows.first; win; win = win->next) for (sa = win->screen->areabase.first; sa; sa = sa->next) diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 4c86862fae8..e06ee4c21f9 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -405,7 +405,7 @@ void PAINT_OT_vert_select_ungrouped(wmOperatorType *ot) static int face_select_hide_exec(bContext *C, wmOperator *op) { - const int unselected = RNA_boolean_get(op->ptr, "unselected"); + const bool unselected = RNA_boolean_get(op->ptr, "unselected"); Object *ob = CTX_data_active_object(C); paintface_hide(ob, unselected); ED_region_tag_redraw(CTX_wm_region(C)); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 4608a25cc00..eea7851415c 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4218,9 +4218,9 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, /* Returns true if any of the smoothing modes are active (currently * one of smooth brush, autosmooth, mask smooth, or shift-key * smooth) */ -static int sculpt_any_smooth_mode(const Brush *brush, - StrokeCache *cache, - int stroke_mode) +static bool sculpt_any_smooth_mode(const Brush *brush, + StrokeCache *cache, + int stroke_mode) { return ((stroke_mode == BRUSH_STROKE_SMOOTH) || (cache && cache->alt_smooth) || @@ -4393,8 +4393,8 @@ static int sculpt_brush_stroke_init(bContext *C, wmOperator *op) SculptSession *ss = CTX_data_active_object(C)->sculpt; Brush *brush = BKE_paint_brush(&sd->paint); int mode = RNA_enum_get(op->ptr, "mode"); - int is_smooth = 0; - int need_mask = false; + bool is_smooth; + bool need_mask = false; if (brush->sculpt_tool == SCULPT_TOOL_MASK) { need_mask = true; diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 673e4d90d99..724d093a48f 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -402,8 +402,8 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) DerivedMesh *dm; SculptSession *ss = ob->sculpt; SculptUndoNode *unode; - int update = false, rebuild = false; - int need_mask = false; + bool update = false, rebuild = false; + bool need_mask = false; for (unode = lb->first; unode; unode = unode->next) { if (strcmp(unode->idname, ob->id.name) == 0) { |