diff options
author | David Robillard <d@drobilla.net> | 2014-11-18 02:35:35 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-18 02:55:03 -0500 |
commit | 07d4f506899bfce60f37fadf851a67b83e66a75a (patch) | |
tree | e9fc707205fb4dd885bf5918a71b013308ecfc65 /libs/ardour/io.cc | |
parent | 881d77f1e5a905009b61444670e9ec1a2aaa71ec (diff) |
Clean up funny code and initialize variables.
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 333b0b1ea0..be626b3010 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -1098,7 +1098,6 @@ int IO::set_ports (const string& str) { vector<string> ports; - int i; 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) { @@ -1143,7 +1138,6 @@ IO::set_ports (const string& str) } ostart = end+1; - i++; } return 0; |