X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fpopups%2Fprobes.cpp;h=a20dfccafb4f345c51d76147f69a2f4852245bde;hb=733eee0e51348243edb5547a33455f96097b7273;hp=8683ab248eb0965ce44289869c9f9160781edef4;hpb=f46e495ef1db0a4e522462ac18260f2151fa2b89;p=pulseview.git diff --git a/pv/popups/probes.cpp b/pv/popups/probes.cpp index 8683ab2..a20dfcc 100644 --- a/pv/popups/probes.cpp +++ b/pv/popups/probes.cpp @@ -20,8 +20,6 @@ #include -#include - #include #include #include @@ -36,9 +34,9 @@ using namespace Qt; -using boost::shared_ptr; using std::map; using std::set; +using std::shared_ptr; using std::vector; using pv::view::Signal; @@ -65,7 +63,8 @@ Probes::Probes(SigSession &session, QWidget *parent) : // Collect a set of signals map > signal_map; const vector< shared_ptr > sigs = _session.get_signals(); - BOOST_FOREACH(const shared_ptr &sig, sigs) + + for (const shared_ptr &sig : sigs) signal_map[sig->probe()] = sig; // Populate channel groups @@ -75,7 +74,7 @@ Probes::Probes(SigSession &session, QWidget *parent) : (const sr_channel_group*)g->data; assert(group); - // Make a set of signals, and removed this signals from the + // Make a set of signals and remove these signals from the // signal map. vector< shared_ptr > group_sigs; for (const GSList *p = group->channels; p; p = p->next) @@ -84,7 +83,9 @@ Probes::Probes(SigSession &session, QWidget *parent) : assert(probe); const auto iter = signal_map.find(probe); - assert(iter != signal_map.end()); + + if (iter == signal_map.end()) + break; group_sigs.push_back((*iter).second); signal_map.erase(iter); @@ -185,7 +186,7 @@ QGridLayout* Probes::create_channel_group_grid( int row = 0, col = 0; QGridLayout *const grid = new QGridLayout(); - BOOST_FOREACH(const shared_ptr& sig, sigs) + for (const shared_ptr& sig : sigs) { assert(sig);