mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Clean up funny code and initialize variables.
This commit is contained in:
parent
881d77f1e5
commit
07d4f50689
1 changed files with 4 additions and 10 deletions
|
|
@ -1098,7 +1098,6 @@ int
|
||||||
IO::set_ports (const string& str)
|
IO::set_ports (const string& str)
|
||||||
{
|
{
|
||||||
vector<string> ports;
|
vector<string> ports;
|
||||||
int i;
|
|
||||||
int n;
|
int n;
|
||||||
uint32_t nports;
|
uint32_t nports;
|
||||||
|
|
||||||
|
|
@ -1115,14 +1114,10 @@ IO::set_ports (const string& str)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string::size_type start, end, ostart;
|
string::size_type start = 0;
|
||||||
|
string::size_type end = 0;
|
||||||
ostart = 0;
|
string::size_type ostart = 0;
|
||||||
start = 0;
|
for (int i = 0; (start = str.find_first_of ('{', ostart)) != string::npos; ++i) {
|
||||||
end = 0;
|
|
||||||
i = 0;
|
|
||||||
|
|
||||||
while ((start = str.find_first_of ('{', ostart)) != string::npos) {
|
|
||||||
start += 1;
|
start += 1;
|
||||||
|
|
||||||
if ((end = str.find_first_of ('}', start)) == string::npos) {
|
if ((end = str.find_first_of ('}', start)) == string::npos) {
|
||||||
|
|
@ -1143,7 +1138,6 @@ IO::set_ports (const string& str)
|
||||||
}
|
}
|
||||||
|
|
||||||
ostart = end+1;
|
ostart = end+1;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue