diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-01-09 11:00:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-01-09 11:07:14 +0300 |
commit | e718004edf3fc335d686cc2a0291f1f0df4eba32 (patch) | |
tree | 97416aa6724970fc430ece20940bd855fdcce6ed /source/blender/editors | |
parent | 246efd7286f6187e4dd4b3edcc79cccb1746bb1d (diff) |
Cleanup: use bool arguments & variables
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/pose_slide.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 6 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index 3781b2e318b..4b646bb26e2 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -1779,7 +1779,7 @@ static void pose_propagate_fcurve( float refVal = 0.0f; bool keyExists; int i, match; - short first = 1; + bool first = true; /* skip if no keyframes to edit */ if ((fcu->bezt == NULL) || (fcu->totvert < 2)) { @@ -1826,7 +1826,7 @@ static void pose_propagate_fcurve( } else if (mode == POSE_PROPAGATE_NEXT_KEY) { /* stop after the first keyframe has been processed */ - if (first == 0) { + if (first == false) { break; } } @@ -1865,7 +1865,7 @@ static void pose_propagate_fcurve( /* select keyframe to indicate that it's been changed */ bezt->f2 |= SELECT; - first = 0; + first = false; } } diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 78dc5fea2ce..29e2af01cac 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -91,7 +91,7 @@ typedef struct BrushPainter { Scene *scene; Brush *brush; - short firsttouch; /* first paint op */ + bool firsttouch; /* first paint op */ struct ImagePool *pool; /* image pool */ rctf tex_mapping; /* texture coordinate mapping */ @@ -161,7 +161,7 @@ static BrushPainter *brush_painter_2d_new(Scene *scene, Brush *brush, bool inver painter->brush = brush; painter->scene = scene; - painter->firsttouch = 1; + painter->firsttouch = true; painter->cache_invert = invert; return painter; @@ -1659,7 +1659,7 @@ void paint_2d_stroke(void *ps, } } - painter->firsttouch = 0; + painter->firsttouch = false; } void *paint_2d_new_stroke(bContext *C, wmOperator *op, int mode) diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 167acf7da18..e11341429a6 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1451,7 +1451,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); const ToolSettings *ts = scene->toolsettings; const bool swap = RNA_boolean_get(op->ptr, "unselected"); - const int use_face_center = (ts->uv_selectmode == UV_SELECT_FACE); + const bool use_face_center = (ts->uv_selectmode == UV_SELECT_FACE); uint objects_len = 0; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs( @@ -1583,8 +1583,8 @@ static int uv_reveal_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); const ToolSettings *ts = scene->toolsettings; - const int use_face_center = (ts->uv_selectmode == UV_SELECT_FACE); - const int stickymode = sima ? (sima->sticky != SI_STICKY_DISABLE) : 1; + const bool use_face_center = (ts->uv_selectmode == UV_SELECT_FACE); + const bool stickymode = sima ? (sima->sticky != SI_STICKY_DISABLE) : 1; const bool select = RNA_boolean_get(op->ptr, "select"); uint objects_len = 0; |