diff options
author | Christian Glöckner <cgloeckner@freenet.de> | 2016-05-27 09:18:41 +0200 |
---|---|---|
committer | Christian Glöckner <cgloeckner@freenet.de> | 2016-05-27 09:18:41 +0200 |
commit | 3846acf047ff9a37d0cb7bedf7fb7faa46473111 (patch) | |
tree | dbcc69a0bb3451c53468d40bcb2ea6456f727c0b /src/drumkitparser.cc | |
parent | 52b37cac974eb150d49eee1f0b5ba3654f6d7716 (diff) |
added another range-based loop
Diffstat (limited to 'src/drumkitparser.cc')
-rw-r--r-- | src/drumkitparser.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc index cd1c32d..dd79bce 100644 --- a/src/drumkitparser.cc +++ b/src/drumkitparser.cc @@ -195,11 +195,7 @@ void DrumKitParser::endTag(const std::string& name) kit.instruments.push_back(std::move(ptr)); // Assign kit channel numbers to instruments channels. - std::vector<InstrumentChannel*>::iterator ic = parser.channellist.begin(); - while(ic != parser.channellist.end()) - { - InstrumentChannel* c = *ic; - + for (auto& c: parser.channellist) { std::string cname = c->name; if(channelmap.find(cname) != channelmap.end()) { @@ -226,7 +222,6 @@ void DrumKitParser::endTag(const std::string& name) c->name.c_str(), c->num, i.name().c_str()); */ } - ic++; } channelmap.clear(); |