Cleanup: Reduce nesteds in node.cc #105509
|
@ -3758,10 +3758,7 @@ int nodeSocketLinkLimit(const bNodeSocket *sock)
|
|||
if (!stype.use_link_limits_of_type) {
|
||||
return sock->limit;
|
||||
}
|
||||
if (sock->in_out == SOCK_IN) {
|
||||
return stype.input_link_limit;
|
||||
}
|
||||
return stype.output_link_limit;
|
||||
return sock->in_out == SOCK_IN ? stype.input_link_limit : stype.output_link_limit;
|
||||
mod_moder marked this conversation as resolved
Outdated
|
||||
}
|
||||
|
||||
static void update_socket_declarations(ListBase *sockets,
|
||||
|
|
Loading…
Reference in New Issue
Personally I find this easier to read than what you've done here. It's a simple check and splitting it over multiple lines makes it seem more complex than it is.
return sock->in_out == SOCK_IN ? stype.input_link_limit : stype.output_link_limit;