diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 19:49:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 20:08:25 +0300 |
commit | 16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch) | |
tree | 5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/nodes | |
parent | 88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff) |
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
Diffstat (limited to 'source/blender/nodes')
5 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 16896470a6d..2c4d7057b4e 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -135,7 +135,7 @@ static void verify_socket_template_list(bNodeTree *ntree, bNodeSocketTemplate *stemp; /* no inputs anymore? */ - if (stemp_first == NULL) { + if (stemp_first == nullptr) { for (sock = (bNodeSocket *)socklist->first; sock; sock = nextsock) { nextsock = sock->next; nodeRemoveSocket(ntree, node, sock); @@ -266,7 +266,7 @@ void node_socket_init_default_value(bNodeSocket *sock) case SOCK_OBJECT: { bNodeSocketValueObject *dval = (bNodeSocketValueObject *)MEM_callocN( sizeof(bNodeSocketValueObject), "node socket value object"); - dval->value = NULL; + dval->value = nullptr; sock->default_value = dval; break; @@ -274,7 +274,7 @@ void node_socket_init_default_value(bNodeSocket *sock) case SOCK_IMAGE: { bNodeSocketValueImage *dval = (bNodeSocketValueImage *)MEM_callocN( sizeof(bNodeSocketValueImage), "node socket value image"); - dval->value = NULL; + dval->value = nullptr; sock->default_value = dval; break; @@ -490,13 +490,13 @@ static bNodeSocketType *make_standard_socket_type(int type, int subtype) /* set the RNA type * uses the exact same identifier as the socket type idname */ srna = stype->ext_socket.srna = RNA_struct_find(socket_idname); - BLI_assert(srna != NULL); + BLI_assert(srna != nullptr); /* associate the RNA type with the socket type */ RNA_struct_blender_type_set(srna, stype); /* set the interface RNA type */ srna = stype->ext_interface.srna = RNA_struct_find(interface_idname); - BLI_assert(srna != NULL); + BLI_assert(srna != nullptr); /* associate the RNA type with the socket type */ RNA_struct_blender_type_set(srna, stype); @@ -533,7 +533,7 @@ static bNodeSocketType *make_socket_type_virtual() /* set the RNA type * uses the exact same identifier as the socket type idname */ srna = stype->ext_socket.srna = RNA_struct_find(socket_idname); - BLI_assert(srna != NULL); + BLI_assert(srna != nullptr); /* associate the RNA type with the socket type */ RNA_struct_blender_type_set(srna, stype); diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc index c1543f791f1..59b89c46fc7 100644 --- a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc +++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.cc @@ -101,7 +101,7 @@ void register_node_type_sh_seprgb(void) sh_fn_node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0); node_type_socket_templates(&ntype, sh_node_seprgb_in, sh_node_seprgb_out); - node_type_exec(&ntype, NULL, NULL, node_shader_exec_seprgb); + node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_seprgb); node_type_gpu(&ntype, gpu_shader_seprgb); ntype.expand_in_mf_network = sh_node_seprgb_expand_in_mf_network; @@ -159,7 +159,7 @@ void register_node_type_sh_combrgb(void) sh_fn_node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, 0); node_type_socket_templates(&ntype, sh_node_combrgb_in, sh_node_combrgb_out); - node_type_exec(&ntype, NULL, NULL, node_shader_exec_combrgb); + node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_combrgb); node_type_gpu(&ntype, gpu_shader_combrgb); ntype.expand_in_mf_network = sh_node_combrgb_expand_in_mf_network; diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc index becc4623e9a..a86a8bb8935 100644 --- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.cc @@ -172,7 +172,7 @@ void register_node_type_sh_valtorgb(void) node_type_init(&ntype, node_shader_init_valtorgb); node_type_size_preset(&ntype, NODE_SIZE_LARGE); node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); - node_type_exec(&ntype, NULL, NULL, node_shader_exec_valtorgb); + node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_valtorgb); node_type_gpu(&ntype, gpu_shader_valtorgb); ntype.expand_in_mf_network = sh_node_valtorgb_expand_in_mf_network; @@ -215,7 +215,7 @@ void register_node_type_sh_rgbtobw(void) sh_node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0); node_type_socket_templates(&ntype, sh_node_rgbtobw_in, sh_node_rgbtobw_out); - node_type_exec(&ntype, NULL, NULL, node_shader_exec_rgbtobw); + node_type_exec(&ntype, nullptr, nullptr, node_shader_exec_rgbtobw); node_type_gpu(&ntype, gpu_shader_rgbtobw); nodeRegisterType(&ntype); diff --git a/source/blender/nodes/shader/nodes/node_shader_value.cc b/source/blender/nodes/shader/nodes/node_shader_value.cc index 1a1382fa8af..5a8a1b847cc 100644 --- a/source/blender/nodes/shader/nodes/node_shader_value.cc +++ b/source/blender/nodes/shader/nodes/node_shader_value.cc @@ -51,7 +51,7 @@ void register_node_type_sh_value(void) static bNodeType ntype; sh_fn_node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, 0); - node_type_socket_templates(&ntype, NULL, sh_node_value_out); + node_type_socket_templates(&ntype, nullptr, sh_node_value_out); node_type_gpu(&ntype, gpu_shader_value); ntype.expand_in_mf_network = sh_node_value_expand_in_mf_network; diff --git a/source/blender/nodes/simulation/nodes/node_sim_common.cc b/source/blender/nodes/simulation/nodes/node_sim_common.cc index fbc03905d4f..fd26d450129 100644 --- a/source/blender/nodes/simulation/nodes/node_sim_common.cc +++ b/source/blender/nodes/simulation/nodes/node_sim_common.cc @@ -33,10 +33,10 @@ void register_node_type_sim_group(void) ntype.insert_link = node_insert_link_default; ntype.update_internal_links = node_update_internal_links_default; ntype.rna_ext.srna = RNA_struct_find("SimulationNodeGroup"); - BLI_assert(ntype.rna_ext.srna != NULL); + BLI_assert(ntype.rna_ext.srna != nullptr); RNA_struct_blender_type_set(ntype.rna_ext.srna, &ntype); - node_type_socket_templates(&ntype, NULL, NULL); + node_type_socket_templates(&ntype, nullptr, nullptr); node_type_size(&ntype, 140, 60, 400); node_type_label(&ntype, node_group_label); node_type_group_update(&ntype, node_group_update); |