diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-26 18:03:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-26 18:59:24 +0300 |
commit | fca515838e70f8bec7028b840bb921a1be9fabbb (patch) | |
tree | 1752923de19eca5f01ca4cfb5754fd4d1f13d934 /source/blender/gpu | |
parent | d44890ee75634052f325531766a661a5bcef628f (diff) |
Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 56a753ff768..e77ea32e574 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -915,7 +915,7 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, const GPUType outnode = link->output->node; name = outnode->name; - if (strcmp(name, "set_value")==0 || strcmp(name, "set_rgb")==0) { + if (STREQ(name, "set_value") || STREQ(name, "set_rgb")) { input = MEM_dupallocN(outnode->inputs.first); input->type = type; if (input->link) @@ -1109,7 +1109,7 @@ static void gpu_nodes_get_vertex_attributes(ListBase *nodes, GPUVertexAttribs *a if (input->source == GPU_SOURCE_ATTRIB) { for (a=0; a<attribs->totlayer; a++) { if (attribs->layer[a].type == input->attribtype && - strcmp(attribs->layer[a].name, input->attribname) == 0) + STREQ(attribs->layer[a].name, input->attribname)) { break; } @@ -1351,7 +1351,7 @@ int GPU_link_changed(GPUNodeLink *link) node = link->output->node; name = node->name; - if (strcmp(name, "set_value")==0 || strcmp(name, "set_rgb")==0) { + if (STREQ(name, "set_value") || STREQ(name, "set_rgb")) { input = node->inputs.first; return (input->link != NULL); } |