[Bf-blender-cvs] [85672d29f23] master: Alembic: more const-ness
Sybren A. Stüvel
noreply at git.blender.org
Thu Apr 6 16:52:01 CEST 2017
Commit: 85672d29f23984fca9fa3cb5257ed08c970c4b7c
Author: Sybren A. Stüvel
Date: Tue Feb 21 15:00:27 2017 +0100
Branches: master
https://developer.blender.org/rB85672d29f23984fca9fa3cb5257ed08c970c4b7c
Alembic: more const-ness
===================================================================
M source/blender/alembic/intern/abc_util.cc
M source/blender/alembic/intern/abc_util.h
===================================================================
diff --git a/source/blender/alembic/intern/abc_util.cc b/source/blender/alembic/intern/abc_util.cc
index 8b6b2a47e4a..b07cbfe1c5a 100644
--- a/source/blender/alembic/intern/abc_util.cc
+++ b/source/blender/alembic/intern/abc_util.cc
@@ -41,7 +41,7 @@ extern "C" {
#include "PIL_time.h"
}
-std::string get_id_name(Object *ob)
+std::string get_id_name(const Object * const ob)
{
if (!ob) {
return "";
@@ -50,7 +50,7 @@ std::string get_id_name(Object *ob)
return get_id_name(&ob->id);
}
-std::string get_id_name(ID *id)
+std::string get_id_name(const ID * const id)
{
std::string name(id->name + 2);
std::replace(name.begin(), name.end(), ' ', '_');
@@ -60,7 +60,7 @@ std::string get_id_name(ID *id)
return name;
}
-std::string get_object_dag_path_name(Object *ob, Object *dupli_parent)
+std::string get_object_dag_path_name(const Object * const ob, Object *dupli_parent)
{
std::string name = get_id_name(ob);
diff --git a/source/blender/alembic/intern/abc_util.h b/source/blender/alembic/intern/abc_util.h
index 3a5d5e914af..47ce15b7dfb 100644
--- a/source/blender/alembic/intern/abc_util.h
+++ b/source/blender/alembic/intern/abc_util.h
@@ -44,9 +44,9 @@ struct ImportSettings;
struct ID;
struct Object;
-std::string get_id_name(ID *id);
-std::string get_id_name(Object *ob);
-std::string get_object_dag_path_name(Object *ob, Object *dupli_parent);
+std::string get_id_name(const ID * const id);
+std::string get_id_name(const Object * const ob);
+std::string get_object_dag_path_name(const Object * const ob, Object *dupli_parent);
bool object_selected(Object *ob);
bool parent_selected(Object *ob);
More information about the Bf-blender-cvs
mailing list