diff options
author | David Robillard <d@drobilla.net> | 2012-08-14 04:23:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-14 04:23:23 +0000 |
commit | 80fee5c311fdbdeda573ec81f59158a5fc87d0a1 (patch) | |
tree | 8e7e5a6c9bda32bbe0ae8e8c9f6ab23e44c7c181 /src/Store.cpp | |
parent | 058eaf65642268047a984a5c80d54a1f62a85130 (diff) | |
download | ingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.tar.gz ingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.tar.bz2 ingen-80fee5c311fdbdeda573ec81f59158a5fc87d0a1.zip |
Update for latest Raul.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4687 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Store.cpp')
-rw-r--r-- | src/Store.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Store.cpp b/src/Store.cpp index e18608c3..c0cb71b8 100644 --- a/src/Store.cpp +++ b/src/Store.cpp @@ -61,12 +61,12 @@ Store::children_end(SharedPtr<const GraphObject> o) const SharedPtr<GraphObject> Store::find_child(SharedPtr<const GraphObject> parent, - const string& child_name) const + const Raul::Symbol& symbol) const { const_iterator pi = find(parent->path()); assert(pi != end()); const_iterator children_end = find_descendants_end(pi); - const_iterator child = find(pi, children_end, parent->path().base() + child_name); + const_iterator child = find(pi, children_end, parent->path().child(symbol)); if (child != end()) return child->second; else @@ -83,14 +83,17 @@ Store::child_name_offset(const Raul::Path& parent, while (true) { std::stringstream ss; ss << symbol; - if (offset > 0) + if (offset > 0) { ss << "_" << offset; - if (find(parent.base() + ss.str()) == end() && (allow_zero || offset > 0)) + } + if (find(parent.child(Raul::Symbol(ss.str()))) == end() && + (allow_zero || offset > 0)) { break; - else if (offset == 0) + } else if (offset == 0) { offset = 2; - else + } else { ++offset; + } } return offset; |