Clenup: use STREQ macro
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user