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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-10-21 13:56:46 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-10-21 14:07:24 +0400
commitbe4b2e42c627a7631c9f02866806bd1702554255 (patch)
treebbb305f417b99d9e4130e2bcec7c38797acd2cbb /source/blender/blenlib/BLI_listbase.h
parent62ceada48fbe70245af27e270c37b73ca8beacf3 (diff)
BLI_listbase: add `BLI_swaplinks` which swaps given links' positions in given list.
Can be much simpler and quicker than using remlink/insert functions.
Diffstat (limited to 'source/blender/blenlib/BLI_listbase.h')
-rw-r--r--source/blender/blenlib/BLI_listbase.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index fb388977ddf..fec05221596 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -73,6 +73,8 @@ void BLI_freelist(struct ListBase *listbase) ATTR_NONNULL(1);
int BLI_countlist(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1);
+void BLI_swaplinks(struct ListBase *listbase, void *vlinka, void *vlinkb) ATTR_NONNULL(1, 2);
+
void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1, 2);
void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1, 2);
void BLI_listbase_reverse(struct ListBase *lb) ATTR_NONNULL(1);