diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-19 13:39:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-19 13:39:18 +0300 |
commit | 889321e22b70006a550c923c0ace18e75732e106 (patch) | |
tree | 8caffa6350a847c936407ccffa40aa85b459c88a /source/blender/blenlib | |
parent | 5a61c1de8269c3398cc638f94141a30e3fbcf3cb (diff) |
Cleanup: reaname LINKLIST_FOREACH -> LISTBASE
LinkList's are a different API, no need to confuse things.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_linklist.h | 3 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_listbase.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_linklist.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/listbase.c | 4 |
4 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_linklist.h b/source/blender/blenlib/BLI_linklist.h index 367f1bb9de5..7eec54e67e1 100644 --- a/source/blender/blenlib/BLI_linklist.h +++ b/source/blender/blenlib/BLI_linklist.h @@ -30,9 +30,6 @@ /** \file BLI_linklist.h * \ingroup bli - * \brief Routines for working with singly linked lists - * of 'links' - pointers to other data. - * */ #include "BLI_compiler_attrs.h" diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h index 1e931e6f0d7..2a0f4e6f814 100644 --- a/source/blender/blenlib/BLI_listbase.h +++ b/source/blender/blenlib/BLI_listbase.h @@ -128,9 +128,9 @@ if ((lb)->last && (lb_init || (lb_init = (lb)->last))) { \ (lb_iter != lb_init)); \ } -#define LINKLIST_FOREACH(type, var, list) \ - for (type var = (type)((list)->first); \ - var != NULL; \ +#define BLI_LISTBASE_FOREACH(type, var, list) \ + for (type var = (type)((list)->first); \ + var != NULL; \ var = (type)(((Link*)(var))->next)) #ifdef __cplusplus diff --git a/source/blender/blenlib/intern/BLI_linklist.c b/source/blender/blenlib/intern/BLI_linklist.c index 1500e23d72e..051792f7f7c 100644 --- a/source/blender/blenlib/intern/BLI_linklist.c +++ b/source/blender/blenlib/intern/BLI_linklist.c @@ -28,6 +28,10 @@ /** \file blender/blenlib/intern/BLI_linklist.c * \ingroup bli + * + * Routines for working with single linked lists of 'links' - pointers to other data. + * + * For double linked lists see 'BLI_listbase.h'. */ #include <stdlib.h> diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c index d2cf0cf49a2..96c3972d802 100644 --- a/source/blender/blenlib/intern/listbase.c +++ b/source/blender/blenlib/intern/listbase.c @@ -29,7 +29,9 @@ /** \file blender/blenlib/intern/listbase.c * \ingroup bli * - * Manipulations on ListBase structs + * Manipulations on double-linked list (#ListBase structs). + * + * For single linked lists see 'BLI_linklist.h' */ #include <string.h> |