diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-31 13:54:55 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-31 13:55:51 +0300 |
commit | e9da71ae2df243bcb2c1ed2e2bacca164a58bd54 (patch) | |
tree | 6dd3543b8e5ab745637d800cf6da05e91ab853df /source/blender/blenkernel | |
parent | c5b9bf32e9e302c6ecf337a414e813c5a8d7487b (diff) |
Cleanup: reduce variable scope and use LISTBASE_FOREACH
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 571a1145958..d9d9bebf970 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -3650,8 +3650,6 @@ static void ntreeUpdateSimulationDependencies(Main *main, bNodeTree *simulation_ void ntreeUpdateTree(Main *bmain, bNodeTree *ntree) { - bNode *node; - if (!ntree) { return; } @@ -3668,7 +3666,7 @@ void ntreeUpdateTree(Main *bmain, bNodeTree *ntree) } /* update individual nodes */ - for (node = ntree->nodes.first; node; node = node->next) { + LISTBASE_FOREACH(bNode *, node, &ntree->nodes) { /* node tree update tags override individual node update flags */ if ((node->update & NODE_UPDATE) || (ntree->update & NTREE_UPDATE)) { if (node->typeinfo->updatefunc) { @@ -3711,7 +3709,7 @@ void ntreeUpdateTree(Main *bmain, bNodeTree *ntree) } /* clear update flags */ - for (node = ntree->nodes.first; node; node = node->next) { + LISTBASE_FOREACH(bNode *, node, &ntree->nodes) { node->update = 0; } ntree->update = 0; |