diff options
author | Charlie Jolly <mistajolly@gmail.com> | 2021-12-31 15:53:21 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2021-12-31 16:05:58 +0300 |
commit | 56344fb30fe41bb18a2fce246a30a9e14a8d4e25 (patch) | |
tree | 9d0026dc0818d0414c05dbc171bac1023b93549b /source | |
parent | 018272ee5bc74b9b651218b72cf0b348e9ca149d (diff) |
Cleanup: Silence warning for wrong const char comparison
Incorrectly used comparison for empty string.
Reported in chat by @jacqueslucke.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_math.cc | 2 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_vector_math.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.cc b/source/blender/nodes/shader/nodes/node_shader_math.cc index 1b450a6414b..cff3d5f347a 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.cc +++ b/source/blender/nodes/shader/nodes/node_shader_math.cc @@ -76,7 +76,7 @@ static void sh_node_math_gather_link_searches(GatherLinkSearchOpParams ¶ms) for (const EnumPropertyItem *item = rna_enum_node_math_items; item->identifier != nullptr; item++) { - if (item->name != nullptr && item->identifier != "") { + if (item->name != nullptr && item->identifier[0] != '\0') { params.add_item( IFACE_(item->name), SocketSearchOp{"Value", (NodeMathOperation)item->value}, weight); } diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc index a488e709373..e48a668f9f5 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc +++ b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc @@ -68,7 +68,7 @@ static void sh_node_vector_math_gather_link_searches(GatherLinkSearchOpParams &p for (const EnumPropertyItem *item = rna_enum_node_vec_math_items; item->identifier != nullptr; item++) { - if (item->name != nullptr && item->identifier != "") { + if (item->name != nullptr && item->identifier[0] != '\0') { if ((params.in_out() == SOCK_OUT) && ELEM(item->value, NODE_VECTOR_MATH_LENGTH, NODE_VECTOR_MATH_DISTANCE, |