diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-21 11:35:50 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-21 11:37:23 +0300 |
commit | 3bb53b0ee640e744219e2a38207d1fbc76ca2068 (patch) | |
tree | b84afd5a022be12f02ce36c17e867fbdd0dcd266 /source/blender/editors/sculpt_paint/paint_vertex.c | |
parent | 213445e3896922c2278fc7cdcb74d8ca13fa6a3e (diff) |
Cleanup: Sculpt/Paint ED code: correct return constant types.
Mainly use false/true for bool, but also a few others.
No change in behavior expected.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 4a3babde5f3..b11bc3fa33d 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -217,12 +217,12 @@ static bool vertex_paint_poll_ex(bContext *C, bool check_tool) ARegion *region = CTX_wm_region(C); if (region->regiontype == RGN_TYPE_WINDOW) { if (!check_tool || WM_toolsystem_active_tool_is_brush(C)) { - return 1; + return true; } } } } - return 0; + return false; } bool vertex_paint_poll(bContext *C) @@ -253,11 +253,11 @@ static bool weight_paint_poll_ex(bContext *C, bool check_tool) ARegion *region = CTX_wm_region(C); if (ELEM(region->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_HUD)) { if (!check_tool || WM_toolsystem_active_tool_is_brush(C)) { - return 1; + return true; } } } - return 0; + return false; } bool weight_paint_poll(bContext *C) @@ -1399,12 +1399,12 @@ static bool paint_mode_toggle_poll_test(bContext *C) { Object *ob = CTX_data_active_object(C); if (ob == NULL || ob->type != OB_MESH) { - return 0; + return false; } if (!ob->data || ID_IS_LINKED(ob->data)) { - return 0; + return false; } - return 1; + return true; } void PAINT_OT_weight_paint_toggle(wmOperatorType *ot) @@ -2757,7 +2757,7 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f memset(ob->sculpt->mode.vpaint.previous_color, 0, sizeof(uint) * me->totloop); } - return 1; + return true; } static void do_vpaint_brush_calc_average_color_cb_ex(void *__restrict userdata, |