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:
authorJacques Lucke <jacques@blender.org>2020-09-02 20:10:18 +0300
committerJacques Lucke <jacques@blender.org>2020-09-02 20:10:40 +0300
commitf5e55c33378b96e614710006121860eb880e6820 (patch)
tree4f24b19e6b5e187d9b7b3d43f741c26f2c843fc8 /source/blender/editors/space_node/node_draw.c
parentf20f82ce3ee55c12adcec024e0133e71183e07b3 (diff)
Cleanup: use bool instead of int in various places
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 56e53e79a8d..ba6b164704f 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -188,7 +188,7 @@ static bool compare_nodes(const bNode *a, const bNode *b)
for (parent = a->parent; parent; parent = parent->parent) {
/* if b is an ancestor, it is always behind a */
if (parent == b) {
- return 1;
+ return true;
}
/* any selected ancestor moves the node forward */
if (parent->flag & NODE_ACTIVE) {
@@ -201,7 +201,7 @@ static bool compare_nodes(const bNode *a, const bNode *b)
for (parent = b->parent; parent; parent = parent->parent) {
/* if a is an ancestor, it is always behind b */
if (parent == a) {
- return 0;
+ return false;
}
/* any selected ancestor moves the node forward */
if (parent->flag & NODE_ACTIVE) {
@@ -214,21 +214,21 @@ static bool compare_nodes(const bNode *a, const bNode *b)
/* if one of the nodes is in the background and the other not */
if ((a->flag & NODE_BACKGROUND) && !(b->flag & NODE_BACKGROUND)) {
- return 0;
+ return false;
}
if (!(a->flag & NODE_BACKGROUND) && (b->flag & NODE_BACKGROUND)) {
- return 1;
+ return true;
}
/* if one has a higher selection state (active > selected > nothing) */
if (!b_active && a_active) {
- return 1;
+ return true;
}
if (!b_select && (a_active || a_select)) {
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* Sorts nodes by selection: unselected nodes first, then selected,