diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-01 08:23:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-01 08:23:56 +0300 |
commit | 90dac47717b12f33d5dd738da12a337cfe4f2f14 (patch) | |
tree | 9f4fff2c54dd7586c7929eedd95608dbca99ba99 /source/blender/editors/animation/anim_deps.c | |
parent | 838b6ec48af6fb767089784193d8525c5f5faf13 (diff) |
Cleanup: remove redundant strstr calls
Rely on BLI_str_quoted_substrN to detect if the prefix exists since
this function exists early there is no need to check before calling.
Diffstat (limited to 'source/blender/editors/animation/anim_deps.c')
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 42fdb714127..2cc0f6ad288 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -207,19 +207,14 @@ static void animchan_sync_fcurve_scene(bAnimListElem *ale) Scene *scene = (Scene *)owner_id; FCurve *fcu = (FCurve *)ale->data; - /* only affect if F-Curve involves sequence_editor.sequences */ - if (!strstr(fcu->rna_path, "sequences_all")) { - return; - } - - Editing *ed = SEQ_editing_get(scene, false); - - /* get strip name, and check if this strip is selected */ + /* Only affect if F-Curve involves sequence_editor.sequences. */ char *seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all["); if (seq_name == NULL) { return; } + /* Check if this strip is selected. */ + Editing *ed = SEQ_editing_get(scene, false); Sequence *seq = SEQ_get_sequence_by_name(ed->seqbasep, seq_name, false); MEM_freeN(seq_name); |