Depsgraph: Use const char for component API

This commit is contained in:
Sergey Sharybin 2016-11-03 12:14:47 +01:00
parent c8f942574d
commit c520c4955f
3 changed files with 15 additions and 11 deletions

View File

@ -177,7 +177,7 @@ TimeSourceDepsNode *DepsgraphNodeBuilder::add_time_source(ID *id)
ComponentDepsNode *DepsgraphNodeBuilder::add_component_node(
ID *id,
eDepsNode_Type comp_type,
const string &comp_name)
const char *comp_name)
{
IDDepsNode *id_node = add_id_node(id);
ComponentDepsNode *comp_node = id_node->add_component(comp_type, comp_name);
@ -198,7 +198,8 @@ OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
m_graph->operations.push_back(op_node);
}
else {
fprintf(stderr, "add_operation: Operation already exists - %s has %s at %p\n",
fprintf(stderr,
"add_operation: Operation already exists - %s has %s at %p\n",
comp_node->identifier().c_str(),
op_node->identifier().c_str(),
op_node);
@ -210,7 +211,7 @@ OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
ID *id,
eDepsNode_Type comp_type,
const string &comp_name,
const char *comp_name,
eDepsOperation_Type optype,
DepsEvalOperationCb op,
eDepsOperation_Code opcode,
@ -233,17 +234,21 @@ OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
bool DepsgraphNodeBuilder::has_operation_node(ID *id,
eDepsNode_Type comp_type,
const string &comp_name,
const char *comp_name,
eDepsOperation_Code opcode,
const string &description)
{
return find_operation_node(id, comp_type, comp_name, opcode, description) != NULL;
return find_operation_node(id,
comp_type,
comp_name,
opcode,
description) != NULL;
}
OperationDepsNode *DepsgraphNodeBuilder::find_operation_node(
ID *id,
eDepsNode_Type comp_type,
const string &comp_name,
const char *comp_name,
eDepsOperation_Code opcode,
const string &description)
{

View File

@ -76,7 +76,7 @@ struct DepsgraphNodeBuilder {
ComponentDepsNode *add_component_node(ID *id,
eDepsNode_Type comp_type,
const string& comp_name = "");
const char *comp_name = "");
OperationDepsNode *add_operation_node(ComponentDepsNode *comp_node,
eDepsOperation_Type optype,
@ -85,7 +85,7 @@ struct DepsgraphNodeBuilder {
const string& description = "");
OperationDepsNode *add_operation_node(ID *id,
eDepsNode_Type comp_type,
const string& comp_name,
const char *comp_name,
eDepsOperation_Type optype,
DepsEvalOperationCb op,
eDepsOperation_Code opcode,
@ -99,13 +99,13 @@ struct DepsgraphNodeBuilder {
bool has_operation_node(ID *id,
eDepsNode_Type comp_type,
const string& comp_name,
const char *comp_name,
eDepsOperation_Code opcode,
const string& description = "");
OperationDepsNode *find_operation_node(ID *id,
eDepsNode_Type comp_type,
const string &comp_name,
const char *comp_name,
eDepsOperation_Code opcode,
const string &description = "");

View File

@ -39,7 +39,6 @@
extern "C" {
#include "BLI_blenlib.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_action_types.h"