Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-07-03 18:20:08 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-07-03 18:42:45 +0300
commit3aa53b361d135e3620b83a7cf0766c92c41aaccb (patch)
treef567240a6d759b0a0833f133290cc4e5b138c87b /source/blender/editors/space_node/node_relationships.c
parentbf532b11068d2f203f2a6db573e73c7d6b5b7407 (diff)
Cleanup: Editors/Space/Node, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/space_node` module. No functional changes.
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r--source/blender/editors/space_node/node_relationships.c24
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 */