Cleanup: VSE iterator semantics

Use `BLI_gset_ensure_p_ex()` instead of `BLI_gset_insert()` after
checking `BLI_gset_lookup()`.
This commit is contained in:
Richard Antalik 2021-10-07 00:35:57 +02:00
parent 877ba6b251
commit 439c9b0b84
Notes: blender-bot 2023-02-14 09:44:56 +01:00
Referenced by issue #92020, Geometry Nodes Fields - Missing "Align Rotation to Vector" / conversion of Normal to Euler rotation
Referenced by issue #43295, Translation disambiguation requests
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}