diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 15:51:19 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:15:00 +0300 |
commit | f82e52ebc838b666c258090236f0323d0d4f6aee (patch) | |
tree | c3980e3b94e1ff6066a0389d11fe8dee4b5455d6 /source/blender/editors/animation/anim_channels_edit.c | |
parent | 17ba5660182b59c8c2f0b5afc2f73e91b5ffe151 (diff) |
Cleanup: Editors/Animation, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/animation` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/animation/anim_channels_edit.c')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 1ca3452e8d8..d5f68e44ad8 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -505,9 +505,9 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, printf("ERROR: no channel matching the one changed was found\n"); return; } - else { - const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale_setting); + { + const bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale_setting); if (acf == NULL) { printf("ERROR: no channel info for the changed channel\n"); return; @@ -571,9 +571,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, * finished, so skip until we get to the parent of this level */ } - else { - continue; - } + continue; } } } @@ -2314,7 +2312,7 @@ static int animchannels_clean_empty_exec(bContext *C, wmOperator *UNUSED(op)) nla_empty = false; break; } - else if (nlt->strips.first == NULL) { + if (nlt->strips.first == NULL) { /* this track is empty, but another one may still have stuff in it, so can't break yet */ nla_empty = true; } @@ -2812,10 +2810,9 @@ static int animchannels_rename_invoke(bContext *C, wmOperator *UNUSED(op), const if (rename_anim_channels(&ac, channel_index)) { return OPERATOR_FINISHED; } - else { - /* allow event to be handled by selectall operator */ - return OPERATOR_PASS_THROUGH; - } + + /* allow event to be handled by selectall operator */ + return OPERATOR_PASS_THROUGH; } static void ANIM_OT_channels_rename(wmOperatorType *ot) @@ -3372,10 +3369,9 @@ static int animchannels_channel_select_keys_invoke(bContext *C, WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); return OPERATOR_FINISHED; } - else { - /* allow event to be handled by selectall operator */ - return OPERATOR_PASS_THROUGH; - } + + /* allow event to be handled by selectall operator */ + return OPERATOR_PASS_THROUGH; } static void ANIM_OT_channel_select_keys(wmOperatorType *ot) |