projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
881d77f
)
Clean up funny code and initialize variables.
author
David Robillard
<d@drobilla.net>
Tue, 18 Nov 2014 07:35:35 +0000
(
02:35
-0500)
committer
David Robillard
<d@drobilla.net>
Tue, 18 Nov 2014 07:55:03 +0000
(
02:55
-0500)
libs/ardour/io.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/io.cc
b/libs/ardour/io.cc
index 333b0b1ea05e8bf232c48748ca0ab371326adb75..be626b30100576f2608ae9225e7bc6bf8a0e4c7d 100644
(file)
--- a/
libs/ardour/io.cc
+++ b/
libs/ardour/io.cc
@@
-1098,7
+1098,6
@@
int
IO::set_ports (const string& str)
{
vector<string> ports;
IO::set_ports (const string& str)
{
vector<string> ports;
- int i;
int n;
uint32_t nports;
int n;
uint32_t nports;
@@
-1115,14
+1114,10
@@
IO::set_ports (const string& str)
}
}
}
}
- string::size_type start, end, ostart;
-
- ostart = 0;
- start = 0;
- end = 0;
- i = 0;
-
- while ((start = str.find_first_of ('{', ostart)) != string::npos) {
+ string::size_type start = 0;
+ string::size_type end = 0;
+ string::size_type ostart = 0;
+ for (int i = 0; (start = str.find_first_of ('{', ostart)) != string::npos; ++i) {
start += 1;
if ((end = str.find_first_of ('}', start)) == string::npos) {
start += 1;
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;