Cleanup: remove redundant parenthesis (especially with macros)

This commit is contained in:
2022-09-25 22:41:22 +10:00
parent 21d77a417e
commit 0419ee871f
34 changed files with 57 additions and 57 deletions

View File

@@ -685,7 +685,7 @@ const char *node_cmp_rlayers_sock_to_pass(int sock_index)
}
const char *name = cmp_node_rlayers_out[sock_index].name;
/* Exception for alpha, which is derived from Combined. */
return (STREQ(name, "Alpha")) ? RE_PASSNAME_COMBINED : name;
return STREQ(name, "Alpha") ? RE_PASSNAME_COMBINED : name;
}
namespace blender::nodes::node_composite_render_layer_cc {

View File

@@ -151,7 +151,7 @@ static bool colinear_f3_f3_f3(const float3 p1, const float3 p2, const float3 p3)
{
const float3 a = math::normalize(p2 - p1);
const float3 b = math::normalize(p3 - p1);
return (ELEM(a, b, b * -1.0f));
return ELEM(a, b, b * -1.0f);
}
static Curves *create_arc_curve_from_points(const int resolution,

View File

@@ -98,7 +98,7 @@ static bool colinear_f3_f3_f3(const float3 p1, const float3 p2, const float3 p3)
{
const float3 a = math::normalize(p2 - p1);
const float3 b = math::normalize(p3 - p1);
return (ELEM(a, b, b * -1.0f));
return ELEM(a, b, b * -1.0f);
}
static Curves *create_point_circle_curve(

View File

@@ -173,7 +173,7 @@ static void node_shader_update_tex_voronoi(bNodeTree *ntree, bNode *node)
outWSock,
storage.feature != SHD_VORONOI_DISTANCE_TO_EDGE &&
storage.feature != SHD_VORONOI_N_SPHERE_RADIUS &&
(ELEM(storage.dimensions, 1, 4)));
ELEM(storage.dimensions, 1, 4));
nodeSetSocketAvailability(ntree, outRadiusSock, storage.feature == SHD_VORONOI_N_SPHERE_RADIUS);
}