summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/Path.h1
-rw-r--r--tests/path_test.cpp2
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;
}