Replaced lengthy iterator types with the auto keyword
[pulseview.git] / pv / sigsession.cpp
index b441dab8aaf429608dc6d848b47be4156902e57d..6948ced138a43dcc6e0792b0d5c13f9a0eaf205f 100644 (file)
@@ -120,8 +120,8 @@ void SigSession::set_device(
 
 void SigSession::set_file(const string &name) throw(QString)
 {
-       // Deslect the old device, because file type detection in File::create
-       // destorys the old session inside libsigrok.
+       // Deselect the old device, because file type detection in File::create
+       // destroys the old session inside libsigrok.
        set_device(shared_ptr<device::DevInst>());
        set_device(shared_ptr<device::DevInst>(device::File::create(name)));
 }
@@ -290,10 +290,7 @@ vector< shared_ptr<view::DecodeTrace> > SigSession::get_decode_signals() const
 
 void SigSession::remove_decode_signal(view::DecodeTrace *signal)
 {
-       for (vector< shared_ptr<view::DecodeTrace> >::iterator i =
-               _decode_traces.begin();
-               i != _decode_traces.end();
-               i++)
+       for (auto i = _decode_traces.begin(); i != _decode_traces.end(); i++)
                if ((*i).get() == signal)
                {
                        _decode_traces.erase(i);