diff options
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 144e3bd3506..e5409271f7c 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -76,10 +76,9 @@ static bool ntree_check_nodes_connected_dfs(bNodeTree *ntree, bNode *from, bNode if (link->tonode == to) { return true; } - else { - if (ntree_check_nodes_connected_dfs(ntree, link->tonode, to)) { - return true; - } + + if (ntree_check_nodes_connected_dfs(ntree, link->tonode, to)) { + return true; } } } @@ -191,9 +190,7 @@ static int sort_nodes_locx(const void *a, const void *b) if (node1->locx > node2->locx) { return 1; } - else { - return 0; - } + return 0; } static bool socket_is_available(bNodeTree *UNUSED(ntree), bNodeSocket *sock, const bool allow_used) @@ -921,9 +918,7 @@ static int node_link_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } - else { - return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; - } + return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; } static void node_link_cancel(bContext *C, wmOperator *op) @@ -1078,9 +1073,8 @@ static int cut_links_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + + return OPERATOR_CANCELLED; } return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH; @@ -1473,9 +1467,7 @@ static bool ed_node_link_conditions(ScrArea *area, if (select) { break; } - else { - select = node; - } + select = node; } } /* only one selected */ |