summaryrefslogtreecommitdiff
path: root/gtk2_ardour/utils.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-09-29 21:39:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-09-29 21:39:39 +0000
commit09ee5d9967328c1fabd4aca7766f9613acd8ee5e (patch)
treea64a893aa4184475d9799d76daaefd60b8e88eb1 /gtk2_ardour/utils.cc
parent7adf76bbe61435dcd6859895f4cadd4feb797f18 (diff)
many important changes to configuration system and specific parameters
git-svn-id: svn://localhost/ardour2/trunk@935 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r--gtk2_ardour/utils.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index ef90c34755..7e58d0e2f7 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -469,3 +469,30 @@ get_xpm (std::string name)
return (xpm_map[name]);
}
+string
+longest (vector<string>& strings)
+{
+ if (strings.empty()) {
+ return string ("");
+ }
+
+ vector<string>::iterator longest = strings.begin();
+ string::size_type longest_length = (*longest).length();
+
+ vector<string>::iterator i = longest;
+ ++i;
+
+ while (i != strings.end()) {
+
+ string::size_type len = (*i).length();
+
+ if (len > longest_length) {
+ longest = i;
+ longest_length = len;
+ }
+
+ ++i;
+ }
+
+ return *longest;
+}