diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 18:20:08 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 18:42:45 +0300 |
commit | 3aa53b361d135e3620b83a7cf0766c92c41aaccb (patch) | |
tree | f567240a6d759b0a0833f133290cc4e5b138c87b /source/blender/editors/space_node/node_draw.c | |
parent | bf532b11068d2f203f2a6db573e73c7d6b5b7407 (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_draw.c')
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index c3823d8eb27..22b549cbd5d 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -97,9 +97,7 @@ static bNodeTree *node_tree_from_ID(ID *id) if (GS(id->name) == ID_NT) { return (bNodeTree *)id; } - else { - return ntreeFromID(id); - } + return ntreeFromID(id); } return NULL; @@ -217,7 +215,7 @@ static bool compare_nodes(const bNode *a, const bNode *b) if ((a->flag & NODE_BACKGROUND) && !(b->flag & NODE_BACKGROUND)) { return 0; } - else if (!(a->flag & NODE_BACKGROUND) && (b->flag & NODE_BACKGROUND)) { + if (!(a->flag & NODE_BACKGROUND) && (b->flag & NODE_BACKGROUND)) { return 1; } @@ -225,7 +223,7 @@ static bool compare_nodes(const bNode *a, const bNode *b) if (!b_active && a_active) { return 1; } - else if (!b_select && (a_active || a_select)) { + if (!b_select && (a_active || a_select)) { return 1; } @@ -1558,15 +1556,13 @@ int node_get_resize_cursor(int directions) if (directions == 0) { return WM_CURSOR_DEFAULT; } - else if ((directions & ~(NODE_RESIZE_TOP | NODE_RESIZE_BOTTOM)) == 0) { + if ((directions & ~(NODE_RESIZE_TOP | NODE_RESIZE_BOTTOM)) == 0) { return WM_CURSOR_Y_MOVE; } - else if ((directions & ~(NODE_RESIZE_RIGHT | NODE_RESIZE_LEFT)) == 0) { + if ((directions & ~(NODE_RESIZE_RIGHT | NODE_RESIZE_LEFT)) == 0) { return WM_CURSOR_X_MOVE; } - else { - return WM_CURSOR_EDIT; - } + return WM_CURSOR_EDIT; } void node_set_cursor(wmWindow *win, SpaceNode *snode, float cursor[2]) |