mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
edit groups tab gets headers (carl); use sampo's SSE find_peaks code; fix build for find_peaks on x86; don't duplicate sources when embedding; use Glib::ustring for all source-related strings; fixup plugin UI automation buttons
git-svn-id: svn://localhost/ardour2/trunk@1595 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6fadaae2cb
commit
702411f658
20 changed files with 223 additions and 150 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include <pbd/strsplit.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Glib;
|
||||
|
||||
void
|
||||
split (string str, vector<string>& result, char splitchar)
|
||||
|
|
@ -39,3 +40,41 @@ split (string str, vector<string>& result, char splitchar)
|
|||
result.push_back (remaining);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
split (ustring str, vector<ustring>& result, char splitchar)
|
||||
{
|
||||
ustring::size_type pos;
|
||||
ustring remaining;
|
||||
ustring::size_type len = str.length();
|
||||
int cnt;
|
||||
|
||||
cnt = 0;
|
||||
|
||||
if (str.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (ustring::size_type n = 0; n < len; ++n) {
|
||||
if (str[n] == splitchar) {
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
if (cnt == 0) {
|
||||
result.push_back (str);
|
||||
return;
|
||||
}
|
||||
|
||||
remaining = str;
|
||||
|
||||
while ((pos = remaining.find_first_of (':')) != ustring::npos) {
|
||||
result.push_back (remaining.substr (0, pos));
|
||||
remaining = remaining.substr (pos+1);
|
||||
}
|
||||
|
||||
if (remaining.length()) {
|
||||
|
||||
result.push_back (remaining);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue