diff options
author | David Robillard <d@drobilla.net> | 2008-12-12 18:00:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-12-12 18:00:39 +0000 |
commit | 51ed9dbf7ba54c0923a77ad32b38861cf7cd74b4 (patch) | |
tree | cd08d136ab3f0f3aada9b26b98a431711f78ce96 /raul | |
parent | 2cffcbd93488ea94be48be6e9d24b8bce3d0da08 (diff) | |
download | raul-51ed9dbf7ba54c0923a77ad32b38861cf7cd74b4.tar.gz raul-51ed9dbf7ba54c0923a77ad32b38861cf7cd74b4.tar.bz2 raul-51ed9dbf7ba54c0923a77ad32b38861cf7cd74b4.zip |
Fix assertion death on ingen -egl
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@1851 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul')
-rw-r--r-- | raul/Path.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/raul/Path.hpp b/raul/Path.hpp index 5994ef3..ea5b4b2 100644 --- a/raul/Path.hpp +++ b/raul/Path.hpp @@ -89,8 +89,9 @@ public: /** Return the name of this object (everything after the last '/'). * This is the "method name" for OSC paths. + * The empty string may be returned (if the path is "/"). */ - inline Symbol name() const { + inline std::string name() const { if ((*this) == "/") return ""; else @@ -98,6 +99,15 @@ public: } + /** Return the name of this object (everything after the last '/'). + * This is the "method name" for OSC paths. + * Note it is illegal to call this method on the path "/". + */ + inline Symbol symbol() const { + return substr(find_last_of("/")+1); + } + + /** Return the parent's path. * * Calling this on the path "/" will return "/". |