summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-12-12 18:00:39 +0000
committerDavid Robillard <d@drobilla.net>2008-12-12 18:00:39 +0000
commit51ed9dbf7ba54c0923a77ad32b38861cf7cd74b4 (patch)
treecd08d136ab3f0f3aada9b26b98a431711f78ce96
parent2cffcbd93488ea94be48be6e9d24b8bce3d0da08 (diff)
downloadraul-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
-rw-r--r--raul/Path.hpp12
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 "/".