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:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 04:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commitaa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch)
tree1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/nodes
parent7cb20d841da16d0bffb63154403267500e9941f5 (diff)
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_cryptomatte.c4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal_map.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c
index ce0c1a91072..c8d2d993e75 100644
--- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c
@@ -65,7 +65,7 @@ static void cryptomatte_add(NodeCryptomatte *n, float f)
/* Find the next separator. */
char *token_end = strchr(n->matte_id + start, ',');
- if (token_end == NULL || token_end == n->matte_id + start) {
+ if (ELEM(token_end, NULL, n->matte_id + start)) {
token_end = n->matte_id + end;
}
/* Be aware that token_len still contains any trailing white space. */
@@ -144,7 +144,7 @@ static void cryptomatte_remove(NodeCryptomatte *n, float f)
/* Find the next separator. */
char *token_end = strchr(n->matte_id + start + 1, ',');
- if (token_end == NULL || token_end == n->matte_id + start) {
+ if (ELEM(token_end, NULL, n->matte_id + start)) {
token_end = n->matte_id + end;
}
/* Be aware that token_len still contains any trailing white space. */
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal_map.c b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
index 7dd2ee9a4ac..493acb06963 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal_map.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
@@ -82,7 +82,7 @@ static int gpu_shader_normal_map(GPUMaterial *mat,
}
const char *color_to_normal_fnc_name = "color_to_normal_new_shading";
- if (nm->space == SHD_SPACE_BLENDER_OBJECT || nm->space == SHD_SPACE_BLENDER_WORLD) {
+ if (ELEM(nm->space, SHD_SPACE_BLENDER_OBJECT, SHD_SPACE_BLENDER_WORLD)) {
color_to_normal_fnc_name = "color_to_blender_normal_new_shading";
}