diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 07:22:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 07:22:01 +0300 |
commit | 3612ce55796427a67ba070df165b46698b2d9ace (patch) | |
tree | c76aeafe5739e010048f9b43886d83dc27457cdc /source/blender/blenkernel/BKE_node.h | |
parent | 8c85f1316cdebc636f0210478a8a36b9475269fd (diff) |
Cleanup: name macros w/ matching BEGIN/END
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 09860972802..852285492d2 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -37,7 +37,7 @@ #include "DNA_listBase.h" -/* for FOREACH_NODETREE */ +/* for FOREACH_NODETREE_BEGIN */ #include "DNA_lamp_types.h" #include "DNA_material_types.h" #include "DNA_node_types.h" @@ -643,17 +643,17 @@ void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree); * Examples: * * \code{.c} - * FOREACH_NODETREE(bmain, nodetree, id) { + * FOREACH_NODETREE_BEGIN(bmain, nodetree, id) { * if (id == nodetree) * printf("This is a linkable node tree"); - * } FOREACH_NODETREE_END + * } FOREACH_NODETREE_END; * - * FOREACH_NODETREE(bmain, nodetree, id) { + * FOREACH_NODETREE_BEGIN(bmain, nodetree, id) { * if (nodetree->idname == "ShaderNodeTree") * printf("This is a shader node tree); * if (GS(id) == ID_MA) * printf(" and it's owned by a material"); - * } FOREACH_NODETREE_END + * } FOREACH_NODETREE_END; * \endcode * * \{ @@ -674,7 +674,7 @@ void BKE_node_tree_iter_init(struct NodeTreeIterStore *ntreeiter, struct Main *b bool BKE_node_tree_iter_step(struct NodeTreeIterStore *ntreeiter, struct bNodeTree **r_nodetree, struct ID **r_id); -#define FOREACH_NODETREE(bmain, _nodetree, _id) \ +#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id) \ { \ struct NodeTreeIterStore _nstore; \ bNodeTree *_nodetree; \ @@ -687,7 +687,7 @@ bool BKE_node_tree_iter_step(struct NodeTreeIterStore *ntreeiter, #define FOREACH_NODETREE_END \ } \ } \ -} +} ((void)0) /** \} */ /* -------------------------------------------------------------------- */ |