diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-19 18:31:32 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-19 18:31:32 +0300 |
commit | 9f9244b6ae5edcd17668edccf707f1c84f29b0af (patch) | |
tree | 833bd9d77c9204f00bef2ebe757580cb9d2e7a68 /source/blender | |
parent | e29c54674cec166c079fbdf8cb63e0113d3b5d6f (diff) |
Depsgraph: Remove redundant argument from add_id_node()
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 2 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.cc | 7 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 35542be7aa6..7ae7bc97d48 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -163,7 +163,7 @@ DepsgraphNodeBuilder::~DepsgraphNodeBuilder() IDDepsNode *DepsgraphNodeBuilder::add_id_node(ID *id) { - IDDepsNode *id_node = m_graph->add_id_node(id, id->name); + IDDepsNode *id_node = m_graph->add_id_node(id); #ifdef WITH_COPY_ON_WRITE /* Currently all ID nodes are supposed to have copy-on-write logic. * diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index e1fdb2daf29..5640a22cf2a 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -279,13 +279,13 @@ IDDepsNode *Depsgraph::find_id_node(const ID *id) const return reinterpret_cast<IDDepsNode *>(BLI_ghash_lookup(id_hash, id)); } -IDDepsNode *Depsgraph::add_id_node(ID *id, const char *name, bool do_tag) +IDDepsNode *Depsgraph::add_id_node(ID *id, bool do_tag) { BLI_assert((id->tag & LIB_TAG_COPY_ON_WRITE) == 0); IDDepsNode *id_node = find_id_node(id); if (!id_node) { DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_ID_REF); - id_node = (IDDepsNode *)factory->create_node(id, "", name); + id_node = (IDDepsNode *)factory->create_node(id, "", id->name); if (do_tag) { id->tag |= LIB_TAG_DOIT; } @@ -462,8 +462,7 @@ ID *Depsgraph::ensure_cow_id(ID *id_orig) /* ID is already remapped to copy-on-write. */ return id_orig; } - /* TODO()sergey): What name we should use here? */ - IDDepsNode *id_node = add_id_node(id_orig, id_orig->name, false); + IDDepsNode *id_node = add_id_node(id_orig, false); return id_node->id_cow; } diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h index 9d94fe387a2..94b729812cb 100644 --- a/source/blender/depsgraph/intern/depsgraph.h +++ b/source/blender/depsgraph/intern/depsgraph.h @@ -114,7 +114,7 @@ struct Depsgraph { TimeSourceDepsNode *find_time_source() const; IDDepsNode *find_id_node(const ID *id) const; - IDDepsNode *add_id_node(ID *id, const char *name = "", bool do_tag = true); + IDDepsNode *add_id_node(ID *id, bool do_tag = true); void clear_id_nodes(); /* Add new relationship between two nodes. */ |