From 51ed9dbf7ba54c0923a77ad32b38861cf7cd74b4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 12 Dec 2008 18:00:39 +0000 Subject: Fix assertion death on ingen -egl git-svn-id: http://svn.drobilla.net/lad/trunk/raul@1851 a436a847-0d15-0410-975c-d299462d15a1 --- raul/Path.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 "/". -- cgit v1.2.1