Commit: 439c9b0b8478336f987b532212650c59b5f9f30f
Author: Richard Antalik
Date: Thu Oct 7 00:35:57 2021 +0200
Branches: master
https://developer.blender.org/rB439c9b0b8478336f987b532212650c59b5f9f30f
Cleanup: VSE iterator semantics
Use `BLI_gset_ensure_p_ex()` instead of `BLI_gset_insert()` after
checking `BLI_gset_lookup()`.
===================================================================
M source/blender/sequencer/intern/iterator.c
===================================================================
diff --git a/source/blender/sequencer/intern/iterator.c
b/source/blender/sequencer/intern/iterator.c
index 2429405350b..e83d158881e 100644
--- a/source/blender/sequencer/intern/iterator.c
+++ b/source/blender/sequencer/intern/iterator.c
@@ -189,10 +189,12 @@ SeqCollection *SEQ_query_by_reference(Sequence
*seq_reference,
*/
bool SEQ_collection_append_strip(Sequence *seq, SeqCollection *collection)
{
- if (BLI_gset_lookup(collection->set, seq) != NULL) {
+ void **key;
+ if (BLI_gset_ensure_p_ex(collection->set, seq, &key)) {
return false;
}
- BLI_gset_insert(collection->set, seq);
+
+ *key = (void *)seq;
return true;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs