summaryrefslogtreecommitdiff
path: root/libs/pbd/whitespace.cc
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2006-12-01 06:01:30 +0000
committerTaybin Rutkin <taybin@taybin.com>2006-12-01 06:01:30 +0000
commit927553f6b83add18d03f4bae55421743342d5704 (patch)
treed5379ff2b00477f274f28a608732375449b02672 /libs/pbd/whitespace.cc
parentc103132ae60973dc4ee0831a70b5c6aa1b3d9747 (diff)
PBD::strip_whitespace_edges() returns the empty string if the passed string is
all whitespace. This allows for some mild code cleanup. It's also declared in the PBD namespace now. sfdb-v4 implemented. Instead of fields that go across all files, there is now just one tag field where you can enter comma delimited tags. Searching for tags to follow soon. I recommend trashing your current ~/.ardour2/sfdb file. git-svn-id: svn://localhost/ardour2/trunk@1182 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/whitespace.cc')
-rw-r--r--libs/pbd/whitespace.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/pbd/whitespace.cc b/libs/pbd/whitespace.cc
index 53616133ad..a719fb169f 100644
--- a/libs/pbd/whitespace.cc
+++ b/libs/pbd/whitespace.cc
@@ -2,6 +2,8 @@
using namespace std;
+namespace PBD {
+
void
strip_whitespace_edges (string& str)
{
@@ -24,7 +26,8 @@ strip_whitespace_edges (string& str)
}
if (i == len) {
- /* its all whitespace, not much we can do */
+ /* it's all whitespace, not much we can do */
+ str = "";
return;
}
@@ -55,3 +58,4 @@ strip_whitespace_edges (string& str)
}
}
+} // namespace PBD