Cleanup: Don't do recursion where possible in node.cc #105394
|
@ -678,7 +678,7 @@ struct bNode *nodeAddStaticNode(const struct bContext *C, struct bNodeTree *ntre
|
||||||
/**
|
/**
|
||||||
* \note Goes over entire tree.
|
* \note Goes over entire tree.
|
||||||
*/
|
*/
|
||||||
void nodeUnlinkNode(struct bNodeTree *ntree, const struct bNode *node);
|
void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node);
|
||||||
/**
|
/**
|
||||||
* Find the first available, non-duplicate name for a given node.
|
* Find the first available, non-duplicate name for a given node.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2914,10 +2914,10 @@ void BKE_node_preview_merge_tree(bNodeTree *to_ntree, bNodeTree *from_ntree, boo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nodeUnlinkNode(bNodeTree *ntree, const bNode *node)
|
void nodeUnlinkNode(bNodeTree *ntree, bNode *node)
|
||||||
{
|
{
|
||||||
LISTBASE_FOREACH_MUTABLE (bNodeLink *, link, &ntree->links) {
|
LISTBASE_FOREACH_MUTABLE (bNodeLink *, link, &ntree->links) {
|
||||||
ListBase const *lb = nullptr;
|
ListBase *lb = nullptr;
|
||||||
if (link->fromnode == node) {
|
if (link->fromnode == node) {
|
||||||
lb = &node->outputs;
|
lb = &node->outputs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue