diff options
author | David Robillard <d@drobilla.net> | 2017-03-26 13:49:14 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-26 17:02:09 +0200 |
commit | 470936f0bf3535c688df5551025265916a5dee06 (patch) | |
tree | c52c5ccd41e666ef5737d826e3ee7de0e4aaee15 /src | |
parent | fbb4acda313ecfb69dd1e7c2f1f120072fec382d (diff) | |
download | ingen-470936f0bf3535c688df5551025265916a5dee06.tar.gz ingen-470936f0bf3535c688df5551025265916a5dee06.tar.bz2 ingen-470936f0bf3535c688df5551025265916a5dee06.zip |
Remove Node::set_path() method
Diffstat (limited to 'src')
-rw-r--r-- | src/Store.cpp | 2 | ||||
-rw-r--r-- | src/client/ObjectModel.cpp | 8 | ||||
-rw-r--r-- | src/server/NodeImpl.hpp | 11 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/Store.cpp b/src/Store.cpp index 1767b4f5..2c7294a8 100644 --- a/src/Store.cpp +++ b/src/Store.cpp @@ -109,7 +109,7 @@ Store::rename(const iterator top, const Raul::Path& new_path) : new_path.child( Raul::Path(i->first.substr(old_path.base().length() - 1))); - i->second->set_path(path); + i->second->set_uri(path_to_uri(path)); assert(find(path) == end()); // Shouldn't be dropping objects! insert(make_pair(path, i->second)); } diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp index 94106027..4061b863 100644 --- a/src/client/ObjectModel.cpp +++ b/src/client/ObjectModel.cpp @@ -92,11 +92,11 @@ ObjectModel::set(SPtr<ObjectModel> o) } void -ObjectModel::set_path(const Raul::Path& p) +ObjectModel::set_uri(const Raul::URI& uri) { - _path = p; - _symbol = Raul::Symbol(p.is_root() ? "root" : p.symbol()); - set_uri(path_to_uri(p)); + _path = uri_to_path(uri); + _symbol = Raul::Symbol(_path.is_root() ? "main" : _path.symbol()); + Node::set_uri(uri); _signal_moved.emit(); } diff --git a/src/server/NodeImpl.hpp b/src/server/NodeImpl.hpp index 8e3795d3..f4de621e 100644 --- a/src/server/NodeImpl.hpp +++ b/src/server/NodeImpl.hpp @@ -57,13 +57,10 @@ public: BlockImpl* parent() { return _parent; } /** Rename */ - virtual void set_path(const Raul::Path& new_path) { - _path = new_path; - const char* const new_sym = new_path.symbol(); - if (new_sym[0] != '\0') { - _symbol = Raul::Symbol(new_sym); - } - set_uri(path_to_uri(new_path)); + void set_uri(const Raul::URI& uri) override { + _path = uri_to_path(uri); + _symbol = Raul::Symbol(_path.is_root() ? "main" : _path.symbol()); + Node::set_uri(uri); } const Atom& get_property(const Raul::URI& key) const; |