diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index e173bfb8a7..b4fcf06ef1 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -835,10 +835,9 @@ SMFSource::load_model_unlocked (bool force_reload) eventlist.sort(compare_eventlist); - std::list< std::pair< Evoral::Event*, gint > >::iterator it; - for (it=eventlist.begin(); it!=eventlist.end(); ++it) { - _model->append (*it->first, it->second); - delete it->first; + for (auto & it : eventlist) { + _model->append (*it.first, it.second); + delete it.first; } /* Length ought to be based on data in the file (TrkEnd meta-event, not