summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drumkitparser.cc7
-rw-r--r--src/inputprocessor.cc2
2 files changed, 2 insertions, 7 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();
diff --git a/src/inputprocessor.cc b/src/inputprocessor.cc
index a5d8213..1676090 100644
--- a/src/inputprocessor.cc
+++ b/src/inputprocessor.cc
@@ -72,7 +72,7 @@ bool InputProcessor::processOnset(const event_t& event, size_t pos, double resam
if(ev_instr < kit.instruments.size())
{
- instr = kit.instruments[ev_instr];
+ instr = kit.instruments[ev_instr].get();
}
if(instr == nullptr || !instr->isValid())