diff options
author | David Robillard <d@drobilla.net> | 2011-05-13 02:57:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-13 02:57:36 +0000 |
commit | 198560d5fd499ab14eb4e130ee74e21fa86674a4 (patch) | |
tree | eb7bd2ae2d19b6db2c28c79d1c7663fe5b1f49de /src/shared | |
parent | 981c7950a6f5fc9f22decaee261556d20b641d5c (diff) | |
download | ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.tar.gz ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.tar.bz2 ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.zip |
Make models const in client code.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3259 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/Store.cpp | 7 | ||||
-rw-r--r-- | src/shared/Store.hpp | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/shared/Store.cpp b/src/shared/Store.cpp index 9d5639b1..62c7f824 100644 --- a/src/shared/Store.cpp +++ b/src/shared/Store.cpp @@ -48,7 +48,7 @@ Store::add(GraphObject* o) } Store::const_iterator -Store::children_begin(SharedPtr<GraphObject> o) const +Store::children_begin(SharedPtr<const GraphObject> o) const { const_iterator parent = find(o->path()); assert(parent != end()); @@ -57,7 +57,7 @@ Store::children_begin(SharedPtr<GraphObject> o) const } Store::const_iterator -Store::children_end(SharedPtr<GraphObject> o) const +Store::children_end(SharedPtr<const GraphObject> o) const { const_iterator parent = find(o->path()); assert(parent != end()); @@ -65,7 +65,8 @@ Store::children_end(SharedPtr<GraphObject> o) const } SharedPtr<GraphObject> -Store::find_child(SharedPtr<GraphObject> parent, const string& child_name) const +Store::find_child(SharedPtr<const GraphObject> parent, + const string& child_name) const { const_iterator pi = find(parent->path()); assert(pi != end()); diff --git a/src/shared/Store.hpp b/src/shared/Store.hpp index 53f4ecf2..997305a1 100644 --- a/src/shared/Store.hpp +++ b/src/shared/Store.hpp @@ -34,11 +34,11 @@ public: typedef Raul::Table< Raul::Path, SharedPtr<GraphObject> > Objects; - const_iterator children_begin(SharedPtr<GraphObject> o) const; - const_iterator children_end(SharedPtr<GraphObject> o) const; + const_iterator children_begin(SharedPtr<const GraphObject> o) const; + const_iterator children_end(SharedPtr<const GraphObject> o) const; - SharedPtr<GraphObject> find_child(SharedPtr<GraphObject> parent, - const std::string& child_name) const; + SharedPtr<GraphObject> find_child(SharedPtr<const GraphObject> parent, + const std::string& child_name) const; unsigned child_name_offset(const Raul::Path& parent, const Raul::Symbol& symbol, |