Cleanup: Add warning to ListBase's BLI_remlink regarding not cleared prev/next pointers.

While this behavior can be useful in some cases, it can also create
issues (as in one of own recent commits, 3e5ce23c99), since it
implicetly keeps the removed linknode 'linked' to the listbase.

At least warn about it in the documentation of `BLI_remlink`.
This commit is contained in:
Bastien Montagne
2023-03-01 15:11:11 +01:00
parent 565acb639c
commit 3ff2cbe708

View File

@@ -136,6 +136,8 @@ void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1);
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1);
/**
* Removes \a vlink from \a listbase. Assumes it is linked into there!
*
* \warning Does _not_ clear the `prev`/`next` pointers of the removed `vlink`.
*/
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1);
/**