Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-09-01 08:23:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-01 08:23:56 +0300
commit90dac47717b12f33d5dd738da12a337cfe4f2f14 (patch)
tree9f4fff2c54dd7586c7929eedd95608dbca99ba99 /source/blender/editors/animation/anim_deps.c
parent838b6ec48af6fb767089784193d8525c5f5faf13 (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.c11
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);