diff options
author | Jacques Lucke <jacques@blender.org> | 2022-09-20 14:22:55 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-09-20 14:22:55 +0300 |
commit | 939643741767dbed29b05af2aad93da360932e50 (patch) | |
tree | 48aaef715bd844fc59054a070bdc5545ae972189 /source/blender/blenlib | |
parent | 2b4cb893e7ebb33c24c7413ba0ff10eeb78bddfe (diff) |
Move workspace.c to C++
Differential Revision: https://developer.blender.org/D16020
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_listbase.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h index 9322fa4c85b..6a41fce27b3 100644 --- a/source/blender/blenlib/BLI_listbase.h +++ b/source/blender/blenlib/BLI_listbase.h @@ -301,21 +301,22 @@ struct LinkData *BLI_genericNodeN(void *data); * * \code{.c} * - * LISTBASE_CIRCULAR_FORWARD_BEGIN(listbase, item, item_init) + * LISTBASE_CIRCULAR_FORWARD_BEGIN(type, listbase, item, item_init) * { * ...operate on marker... * } - * LISTBASE_CIRCULAR_FORWARD_END (listbase, item, item_init); + * LISTBASE_CIRCULAR_FORWARD_END (type, listbase, item, item_init); * * \endcode */ -#define LISTBASE_CIRCULAR_FORWARD_BEGIN(lb, lb_iter, lb_init) \ - if ((lb)->first && (lb_init || (lb_init = (lb)->first))) { \ - lb_iter = lb_init; \ +#define LISTBASE_CIRCULAR_FORWARD_BEGIN(type, lb, lb_iter, lb_init) \ + if ((lb)->first && (lb_init || (lb_init = (type)(lb)->first))) { \ + lb_iter = (type)(lb_init); \ do { -#define LISTBASE_CIRCULAR_FORWARD_END(lb, lb_iter, lb_init) \ +#define LISTBASE_CIRCULAR_FORWARD_END(type, lb, lb_iter, lb_init) \ } \ - while ((lb_iter = (lb_iter)->next ? (lb_iter)->next : (lb)->first), (lb_iter != lb_init)) \ + while ((lb_iter = (lb_iter)->next ? (type)(lb_iter)->next : (type)(lb)->first), \ + (lb_iter != lb_init)) \ ; \ } \ ((void)0) |