diff options
author | David Robillard <d@drobilla.net> | 2007-01-02 01:57:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-02 01:57:01 +0000 |
commit | 1a2962681ff62598f6cbe9aed9c5d4c69c0020a6 (patch) | |
tree | 09a18d7922653c420b24bcdc9153c721660583ec | |
parent | d1f1ec4015acee8afce7d72056427a22f589ff4a (diff) | |
download | raul-1a2962681ff62598f6cbe9aed9c5d4c69c0020a6.tar.gz raul-1a2962681ff62598f6cbe9aed9c5d4c69c0020a6.tar.bz2 raul-1a2962681ff62598f6cbe9aed9c5d4c69c0020a6.zip |
Fixed path nameify/pathify bug when brackets followed spaces in input.
git-svn-id: http://svn.drobilla.net/lad/raul@228 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | raul/Path.h | 1 | ||||
-rw-r--r-- | tests/path_test.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/raul/Path.h b/raul/Path.h index e79e111..c19767d 100644 --- a/raul/Path.h +++ b/raul/Path.h @@ -169,6 +169,7 @@ public: if (str[i] == ' ' || str[i] == '_') { str[i+1] = std::toupper(str[i+1]); // capitalize next char str = str.substr(0, i) + str.substr(i+1); // chop space/underscore + --i; } else if (str[i] == '[' || str[i] == '{') { str[i] = '('; } else if (str[i] == ']' || str[i] == '}') { diff --git a/tests/path_test.cpp b/tests/path_test.cpp index 1620703..911b760 100644 --- a/tests/path_test.cpp +++ b/tests/path_test.cpp @@ -12,5 +12,7 @@ main() cerr << (Path("/foo").is_parent_of(Path("/foo/bar"))) << endl; cerr << !(Path("/foo").is_parent_of(Path("/foo2"))) << endl; + cerr << Path::nameify("Signal Level [dB]") << endl; + return 0; } |