summaryrefslogtreecommitdiffstats
path: root/raul/Path.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-12 16:29:52 +0000
committerDavid Robillard <d@drobilla.net>2012-08-12 16:29:52 +0000
commit4fe22a4f393e5e7731a07405767571da021602da (patch)
tree19db592b9c4c669645f110282da3265e226e991f /raul/Path.hpp
parent6ec0c7c6c4bb341926c45db99e7287cce91a8da2 (diff)
downloadraul-4fe22a4f393e5e7731a07405767571da021602da.tar.gz
raul-4fe22a4f393e5e7731a07405767571da021602da.tar.bz2
raul-4fe22a4f393e5e7731a07405767571da021602da.zip
Remove redundant Path::is_valid_name and Path::nameify.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4671 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/Path.hpp')
-rw-r--r--raul/Path.hpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/raul/Path.hpp b/raul/Path.hpp
index 15adf53..7404877 100644
--- a/raul/Path.hpp
+++ b/raul/Path.hpp
@@ -48,7 +48,7 @@ public:
~BadPath() throw() {}
const char* what() const throw() { return _path.c_str(); }
private:
- std::string _path;
+ const std::string _path;
};
/** Return the root path.
@@ -102,13 +102,7 @@ public:
static bool is_valid(const std::basic_string<char>& path);
- static bool is_valid_name(const std::basic_string<char>& name) {
- return name.length() > 0 && name.find("/") == std::string::npos
- && is_valid(std::string("/").append(name));
- }
-
static std::string pathify(const std::basic_string<char>& str);
- static std::string nameify(const std::basic_string<char>& str);
static void replace_invalid_chars(std::string& str,
size_t start,
@@ -166,7 +160,7 @@ public:
}
}
- /** Return the path's child with the given name (symbol)
+ /** Return the path's child with the given symbol
*/
inline Path child(const Raul::Symbol& symbol) const {
return base() + symbol.c_str();
@@ -186,7 +180,7 @@ public:
/** Return path with a trailing "/".
*
* Returned value is guaranteed to be a valid parent path, i.e. a valid
- * child path can be made using parent.base() + child_name.
+ * child path can be made using parent.base() + symbol.
*/
inline const std::string base() const {
std::string ret = str();
@@ -199,7 +193,7 @@ public:
/** Return path with a trailing "/".
*
* Returned value is guaranteed to be a valid parent path, i.e. a valid
- * child path can be made using parent.base() + child_name.
+ * child path can be made using parent.base() + symbol.
*/
inline const std::string base_no_scheme() const {
return base().substr(find(":") + 1);