From 2464395b6d74ecad71e10c990f30ca20ef73b68c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 25 May 2015 18:05:19 +0500 Subject: Depsgraph: Avoid unnecessary char*/string conversion when creating RNAPathKey --- source/blender/depsgraph/intern/depsgraph_build.h | 2 +- source/blender/depsgraph/intern/depsgraph_build_relations.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/depsgraph/intern/depsgraph_build.h b/source/blender/depsgraph/intern/depsgraph_build.h index 93fa9e4b0d8..4088a3289ef 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.h +++ b/source/blender/depsgraph/intern/depsgraph_build.h @@ -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) diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc index a3319e7bb15..5d51bfe750d 100644 --- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc +++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc @@ -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; } -- cgit v1.2.3