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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-11-03 16:45:47 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-11-07 13:04:49 +0300
commit287197c4e33ca27a02188402543af0ba0286a5f5 (patch)
treede1e264d034f2aacd3357c207bab3b1e5af95f53 /source/blender/depsgraph/intern/nodes/deg_node_component.h
parentc9eca0c6c9e710b706711872526634bdd95a3ffa (diff)
Depsgraph: Fully switch from string to const char*
This brings up to 10-20% depsgraph build time improvement in the layout files from the studio repository.
Diffstat (limited to 'source/blender/depsgraph/intern/nodes/deg_node_component.h')
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.h b/source/blender/depsgraph/intern/nodes/deg_node_component.h
index e0d425a2c14..ec2674a7b13 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.h
@@ -53,7 +53,7 @@ struct ComponentDepsNode : public DepsNode {
struct OperationIDKey
{
eDepsOperation_Code opcode;
- string name;
+ const char *name;
int name_tag;
OperationIDKey()
@@ -67,7 +67,7 @@ struct ComponentDepsNode : public DepsNode {
name_tag(-1)
{}
OperationIDKey(eDepsOperation_Code opcode,
- const string &name,
+ const char *name,
int name_tag)
: opcode(opcode),
name(name),
@@ -85,7 +85,7 @@ struct ComponentDepsNode : public DepsNode {
bool operator==(const OperationIDKey &other) const
{
return (opcode == other.opcode) &&
- (name == other.name) &&
+ (STREQ(name, other.name)) &&
(name_tag == other.name_tag);
}
};
@@ -94,20 +94,20 @@ struct ComponentDepsNode : public DepsNode {
ComponentDepsNode();
~ComponentDepsNode();
- void init(const ID *id, const string &subdata);
+ void init(const ID *id, const char *subdata);
string identifier() const;
/* Find an existing operation, will throw an assert() if it does not exist. */
OperationDepsNode *find_operation(OperationIDKey key) const;
OperationDepsNode *find_operation(eDepsOperation_Code opcode,
- const string &name,
+ const char *name,
int name_tag) const;
/* Check operation exists and return it. */
OperationDepsNode *has_operation(OperationIDKey key) const;
OperationDepsNode *has_operation(eDepsOperation_Code opcode,
- const string &name,
+ const char *name,
int name_tag) const;
/**
@@ -126,7 +126,7 @@ struct ComponentDepsNode : public DepsNode {
OperationDepsNode *add_operation(eDepsOperation_Type optype,
DepsEvalOperationCb op,
eDepsOperation_Code opcode,
- const string &name,
+ const char *name,
int name_tag);
void clear_operations();
@@ -206,7 +206,7 @@ struct PoseComponentDepsNode : public ComponentDepsNode {
/* Bone Component */
struct BoneComponentDepsNode : public ComponentDepsNode {
- void init(const ID *id, const string &subdata);
+ void init(const ID *id, const char *subdata);
struct bPoseChannel *pchan; /* the bone that this component represents */