diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-11-03 14:01:45 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-11-07 13:04:49 +0300 |
commit | bbd4b96fe9a1a766bb0a35a077e96f0b4e2fc5ed (patch) | |
tree | 016993762f7ac1fa48ec804835681233d5817e9a | |
parent | a7f53bc5123fcc2fef8f31424aeb7fdd9aaccaa9 (diff) |
Depsgraph: Use const char instead of string in part of drivers construction
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index fd4956bc5a5..e2fbf4374ad 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -32,8 +32,6 @@ #include "intern/depsgraph.h" /* own include */ -#include <string.h> - #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" @@ -116,7 +114,7 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr, const PropertyRNA *prop, ID **id, eDepsNode_Type *type, - string *subdata) + const char **subdata) { if (!ptr->type) return false; @@ -232,7 +230,7 @@ DepsNode *Depsgraph::find_node_from_pointer(const PointerRNA *ptr, { ID *id; eDepsNode_Type type; - string name; + const char *name; /* Get querying conditions. */ if (pointer_to_id_node_criteria(ptr, prop, &id)) { @@ -240,8 +238,9 @@ DepsNode *Depsgraph::find_node_from_pointer(const PointerRNA *ptr, } else if (pointer_to_component_node_criteria(ptr, prop, &id, &type, &name)) { IDDepsNode *id_node = find_id_node(id); - if (id_node) + if (id_node != NULL) { return id_node->find_component(type, name); + } } return NULL; |