Depsgraph: Avoid unnecessary char*/string conversion when creating RNAPathKey

This commit is contained in:
Sergey Sharybin 2015-05-25 18:05:19 +05:00
parent 0b9a65b2ae
commit 2464395b6d
2 changed files with 3 additions and 3 deletions

View File

@ -220,7 +220,7 @@ struct OperationKey
struct RNAPathKey
{
// Note: see depsgraph_build.cpp for implementation
RNAPathKey(ID *id, const string &path);
RNAPathKey(ID *id, const char *path);
RNAPathKey(ID *id, const PointerRNA &ptr, PropertyRNA *prop) :
id(id), ptr(ptr), prop(prop)

View File

@ -108,7 +108,7 @@ extern "C" {
/* **** General purpose functions **** */
RNAPathKey::RNAPathKey(ID *id, const string &path) :
RNAPathKey::RNAPathKey(ID *id, const char *path) :
id(id)
{
/* create ID pointer for root of path lookup */
@ -116,7 +116,7 @@ RNAPathKey::RNAPathKey(ID *id, const string &path) :
RNA_id_pointer_create(id, &id_ptr);
/* try to resolve path... */
int index;
if (!RNA_path_resolve_full(&id_ptr, path.c_str(), &this->ptr, &this->prop, &index)) {
if (!RNA_path_resolve_full(&id_ptr, path, &this->ptr, &this->prop, &index)) {
this->ptr = PointerRNA_NULL;
this->prop = NULL;
}