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_defines.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_defines.c')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 56 |
1 files changed, 20 insertions, 36 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 0947023e071..843b8400a32 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -322,9 +322,7 @@ static short acf_generic_basic_offset(bAnimContext *ac, bAnimListElem *ale) if (acf && acf->get_indent_level) { return acf->get_indent_level(ac, ale) * INDENT_STEP_SIZE; } - else { - return 0; - } + return 0; } /* offset based on nodetree type */ @@ -514,11 +512,10 @@ static int acf_summary_setting_flag(bAnimContext *UNUSED(ac), *neg = true; return ADS_FLAG_SUMMARY_COLLAPSED; } - else { - /* unsupported */ - *neg = false; - return 0; - } + + /* unsupported */ + *neg = false; + return 0; } /* get pointer to the setting */ @@ -538,11 +535,10 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, /* return pointer to DopeSheet's flag */ return GET_ACF_FLAG_PTR(ads->flag, type); } - else { - /* can't return anything useful - unsupported */ - *type = 0; - return NULL; - } + + /* can't return anything useful - unsupported */ + *type = 0; + return NULL; } /* all animation summary (DopeSheet only) type define */ @@ -3815,19 +3811,15 @@ static bool acf_nlatrack_setting_valid(bAnimContext *UNUSED(ac), /* ok - we've got a solo track, and this is it */ return true; } - else { - /* not ok - we've got a solo track, but this isn't it, so make it more obvious */ - return false; - } + /* not ok - we've got a solo track, but this isn't it, so make it more obvious */ + return false; } /* ok - no tracks are solo'd, and this isn't being tweaked */ return true; } - else { - /* unsupported - this track is being tweaked */ - return false; - } + /* unsupported - this track is being tweaked */ + return false; /* unsupported */ default: @@ -3901,9 +3893,8 @@ static int acf_nlaaction_icon(bAnimListElem *ale) if ((adt) && (adt->flag & ADT_NLA_EDIT_ON)) { return ICON_ACTION_TWEAK; } - else { - return ICON_ACTION; - } + + return ICON_ACTION; } /* Backdrop color for nla action channel @@ -4157,9 +4148,8 @@ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale) if ((ale->type >= 0) && (ale->type < ANIMTYPE_NUM_TYPES)) { return animchannelTypeInfo[ale->type]; } - else { - return NULL; - } + + return NULL; } /* --------------------------- */ @@ -4227,9 +4217,7 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne if (negflag) { return ((*val) & flag) == 0; } - else { - return ((*val) & flag) != 0; - } + return ((*val) & flag) != 0; } case sizeof(short): /* short pointer for setting */ { @@ -4238,9 +4226,7 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne if (negflag) { return ((*val) & flag) == 0; } - else { - return ((*val) & flag) != 0; - } + return ((*val) & flag) != 0; } case sizeof(char): /* char pointer for setting */ { @@ -4249,9 +4235,7 @@ short ANIM_channel_setting_get(bAnimContext *ac, bAnimListElem *ale, eAnimChanne if (negflag) { return ((*val) & flag) == 0; } - else { - return ((*val) & flag) != 0; - } + return ((*val) & flag) != 0; } } } |