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:
authorSybren A. Stüvel <sybren@blender.org>2020-01-28 16:50:13 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-28 17:10:44 +0300
commit40a9b5ebc77953a3f0b47def39438beed681aac0 (patch)
tree7c59d584e43ea837a40e064a73859909f08ca84b /source/blender/depsgraph/intern/node/deg_node_id.cc
parent01a348274218103ecdbaddc699a97e86f0c4ce18 (diff)
Cleanup: changed NULL to nullptr in depsgraph C++ code
No functional changes.
Diffstat (limited to 'source/blender/depsgraph/intern/node/deg_node_id.cc')
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_id.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/node/deg_node_id.cc b/source/blender/depsgraph/intern/node/deg_node_id.cc
index e14513a1aa2..853198109a2 100644
--- a/source/blender/depsgraph/intern/node/deg_node_id.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_id.cc
@@ -101,7 +101,7 @@ static void id_deps_node_hash_value_free(void *value_v)
/* Initialize 'id' node - from pointer data given. */
void IDNode::init(const ID *id, const char *UNUSED(subdata))
{
- BLI_assert(id != NULL);
+ BLI_assert(id != nullptr);
/* Store ID-pointer. */
id_orig = (ID *)id;
eval_flags = 0;
@@ -126,7 +126,7 @@ void IDNode::init_copy_on_write(ID *id_cow_hint)
/* Create pointer as early as possible, so we can use it for function
* bindings. Rest of data we'll be copying to the new datablock when
* it is actually needed. */
- if (id_cow_hint != NULL) {
+ if (id_cow_hint != nullptr) {
// BLI_assert(deg_copy_on_write_is_needed(id_orig));
if (deg_copy_on_write_is_needed(id_orig)) {
id_cow = id_cow_hint;
@@ -154,22 +154,22 @@ IDNode::~IDNode()
void IDNode::destroy()
{
- if (id_orig == NULL) {
+ if (id_orig == nullptr) {
return;
}
BLI_ghash_free(components, id_deps_node_hash_key_free, id_deps_node_hash_value_free);
/* Free memory used by this CoW ID. */
- if (id_cow != id_orig && id_cow != NULL) {
+ if (id_cow != id_orig && id_cow != nullptr) {
deg_free_copy_on_write_datablock(id_cow);
MEM_freeN(id_cow);
- id_cow = NULL;
+ id_cow = nullptr;
DEG_COW_PRINT("Destroy CoW for %s: id_orig=%p id_cow=%p\n", id_orig->name, id_orig, id_cow);
}
/* Tag that the node is freed. */
- id_orig = NULL;
+ id_orig = nullptr;
}
string IDNode::identifier() const