Cleanup: Use bool instead of int

This commit is contained in:
Hans Goudey 2021-11-16 17:20:31 -06:00
parent 2f39b45e8c
commit 8290edefad
2 changed files with 10 additions and 10 deletions

View File

@ -1192,7 +1192,7 @@ static bool cursor_isect_multi_input_socket(const float cursor[2], const bNodeSo
}
/* type is SOCK_IN and/or SOCK_OUT */
int node_find_indicated_socket(
bool node_find_indicated_socket(
SpaceNode *snode, bNode **nodep, bNodeSocket **sockp, const float cursor[2], int in_out)
{
rctf rect;
@ -1224,7 +1224,7 @@ int node_find_indicated_socket(
if (node == visible_node(snode, &rect)) {
*nodep = node;
*sockp = sock;
return 1;
return true;
}
}
}
@ -1232,7 +1232,7 @@ int node_find_indicated_socket(
if (node == visible_node(snode, &rect)) {
*nodep = node;
*sockp = sock;
return 1;
return true;
}
}
}
@ -1245,7 +1245,7 @@ int node_find_indicated_socket(
if (node == visible_node(snode, &rect)) {
*nodep = node;
*sockp = sock;
return 1;
return true;
}
}
}
@ -1253,7 +1253,7 @@ int node_find_indicated_socket(
}
}
return 0;
return false;
}
/* ****************** Link Dimming *********************** */

View File

@ -265,11 +265,11 @@ bool composite_node_editable(struct bContext *C);
bool node_has_hidden_sockets(struct bNode *node);
void node_set_hidden_sockets(struct SpaceNode *snode, bNode *node, int set);
int node_render_changed_exec(bContext *, struct wmOperator *);
int node_find_indicated_socket(struct SpaceNode *snode,
struct bNode **nodep,
struct bNodeSocket **sockp,
const float cursor[2],
int in_out);
bool node_find_indicated_socket(struct SpaceNode *snode,
struct bNode **nodep,
struct bNodeSocket **sockp,
const float cursor[2],
int in_out);
float node_link_dim_factor(const struct View2D *v2d, const struct bNodeLink *link);
bool node_link_is_hidden_or_dimmed(const struct View2D *v2d, const struct bNodeLink *link);