diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-02 20:10:18 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-02 20:10:40 +0300 |
commit | f5e55c33378b96e614710006121860eb880e6820 (patch) | |
tree | 4f24b19e6b5e187d9b7b3d43f741c26f2c843fc8 /source/blender/editors/space_graph/graph_buttons.c | |
parent | f20f82ce3ee55c12adcec024e0133e71183e07b3 (diff) |
Cleanup: use bool instead of int in various places
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 0158e12c79c..6dbf6226de8 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -72,7 +72,7 @@ /* -------------- */ -static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **fcu) +static bool graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **fcu) { bAnimContext ac; bAnimListElem *elem = NULL; @@ -83,13 +83,13 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve ** * There's no point showing empty panels? */ if (ANIM_animdata_get_context(C, &ac) == 0) { - return 0; + return false; } /* try to find 'active' F-Curve */ elem = get_active_fcurve_channel(&ac); if (elem == NULL) { - return 0; + return false; } if (fcu) { @@ -102,7 +102,7 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve ** MEM_freeN(elem); } - return 1; + return true; } static bool graph_panel_poll(const bContext *C, PanelType *UNUSED(pt)) @@ -235,7 +235,7 @@ static void graph_panel_properties(const bContext *C, Panel *panel) /* ******************* active Keyframe ************** */ /* get 'active' keyframe for panel editing */ -static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezTriple **prevbezt) +static bool get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezTriple **prevbezt) { BezTriple *b; int i; @@ -245,7 +245,7 @@ static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezT /* sanity checks */ if ((fcu->bezt == NULL) || (fcu->totvert == 0)) { - return 0; + return false; } /* find first selected keyframe for now, and call it the active one @@ -261,12 +261,12 @@ static short get_active_fcurve_keyframe_edit(FCurve *fcu, BezTriple **bezt, BezT *prevbezt = (i > 0) ? b - 1 : b; *bezt = b; - return 1; + return true; } } /* not found */ - return 0; + return false; } /* update callback for active keyframe properties - base updates stuff */ |