[Bf-blender-cvs] [bbd4b96] master: Depsgraph: Use const char instead of string in part of drivers construction
Sergey Sharybin
noreply at git.blender.org
Mon Nov 7 11:43:58 CET 2016
Commit: bbd4b96fe9a1a766bb0a35a077e96f0b4e2fc5ed
Author: Sergey Sharybin
Date: Thu Nov 3 12:01:45 2016 +0100
Branches: master
https://developer.blender.org/rBbbd4b96fe9a1a766bb0a35a077e96f0b4e2fc5ed
Depsgraph: Use const char instead of string in part of drivers construction
===================================================================
M source/blender/depsgraph/intern/depsgraph.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index fd4956b..e2fbf43 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;
More information about the Bf-blender-cvs
mailing list