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-08-08 05:14:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-08 06:38:00 +0300
commit61a045b7d30311b7524b5c40ffb33ef15a53dd0a (patch)
treed5ca744a33988a49fa672aeb86572e7191921c2d /source/blender/gpu/intern
parent586a3084677b03e314a906ffdac3560a24058409 (diff)
Clenup: use STREQ macro
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c6
-rw-r--r--source/blender/gpu/intern/gpu_node_graph.c4
-rw-r--r--source/blender/gpu/intern/gpu_shader_interface.cc2
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 08d2779043e..b051d4fe59a 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -111,11 +111,11 @@ static GPUPass *gpu_pass_cache_resolve_collision(GPUPass *pass,
BLI_spin_lock(&pass_cache_spin);
/* Collision, need to strcmp the whole shader. */
for (; pass && (pass->hash == hash); pass = pass->next) {
- if ((defs != NULL) && (strcmp(pass->defines, defs) != 0)) { /* Pass */
+ if ((defs != NULL) && (!STREQ(pass->defines, defs))) { /* Pass */
}
- else if ((geom != NULL) && (strcmp(pass->geometrycode, geom) != 0)) { /* Pass */
+ else if ((geom != NULL) && (!STREQ(pass->geometrycode, geom))) { /* Pass */
}
- else if ((strcmp(pass->fragmentcode, frag) == 0) && (strcmp(pass->vertexcode, vert) == 0)) {
+ else if ((!STREQ(pass->fragmentcode, frag) == 0) && (STREQ(pass->vertexcode, vert))) {
BLI_spin_unlock(&pass_cache_spin);
return pass;
}
diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c
index 17d97dc05e2..81cf2d69f4d 100644
--- a/source/blender/gpu/intern/gpu_node_graph.c
+++ b/source/blender/gpu/intern/gpu_node_graph.c
@@ -457,10 +457,10 @@ GPUNodeLink *GPU_volume_grid(GPUMaterial *mat, const char *name)
/* Two special cases, where we adjust the output values of smoke grids to
* bring the into standard range without having to modify the grid values. */
- if (strcmp(name, "color") == 0) {
+ if (STREQ(name, "color")) {
GPU_link(mat, "node_attribute_volume_color", link, transform_link, &link);
}
- else if (strcmp(name, "temperature") == 0) {
+ else if (STREQ(name, "temperature")) {
GPU_link(mat, "node_attribute_volume_temperature", link, transform_link, &link);
}
else {
diff --git a/source/blender/gpu/intern/gpu_shader_interface.cc b/source/blender/gpu/intern/gpu_shader_interface.cc
index 50cc68c6be8..4511d4a199d 100644
--- a/source/blender/gpu/intern/gpu_shader_interface.cc
+++ b/source/blender/gpu/intern/gpu_shader_interface.cc
@@ -111,7 +111,7 @@ static const char *BuiltinUniformBlock_name(GPUUniformBlockBuiltin u)
GPU_INLINE bool match(const char *a, const char *b)
{
- return strcmp(a, b) == 0;
+ return STREQ(a, b);
}
GPU_INLINE uint hash_string(const char *str)