X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fheader.cpp;h=0e9445ea239e7a9879e1b88f24e1610b6a09b591;hp=8849ee3fed2beb4b7fe8e9ba1fcfd445412c41df;hb=c063290ac7189bdd15221450f598504f43286b43;hpb=efdec55aec1a137460fa362a381ed1904182bfed diff --git a/pv/view/header.cpp b/pv/view/header.cpp index 8849ee3f..0e9445ea 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -38,11 +38,9 @@ #include using boost::make_filter_iterator; + +using std::count_if; using std::dynamic_pointer_cast; -using std::max; -using std::make_pair; -using std::min; -using std::pair; using std::shared_ptr; using std::stable_sort; using std::vector; @@ -105,8 +103,7 @@ void Header::paintEvent(QPaintEvent*) // would be clipped away. const QRect rect(0, 0, width() - BaselineOffset, height()); - vector< shared_ptr > items( - view_.list_by_type()); + vector< shared_ptr > items(view_.list_by_type()); stable_sort(items.begin(), items.end(), [](const shared_ptr &a, const shared_ptr &b) { @@ -138,8 +135,7 @@ void Header::contextMenuEvent(QContextMenuEvent *event) const vector< shared_ptr > items( view_.list_by_type()); - if (std::count_if(items.begin(), items.end(), item_selected) > 1) - { + if (count_if(items.begin(), items.end(), item_selected) > 1) { menu->addSeparator(); QAction *const group = new QAction(tr("Group"), this); @@ -178,7 +174,7 @@ void Header::on_group() shared_ptr group(new TraceGroup()); shared_ptr mouse_down_item( - std::dynamic_pointer_cast(mouse_down_item_)); + dynamic_pointer_cast(mouse_down_item_)); shared_ptr focus_item( mouse_down_item ? mouse_down_item : selected_items.front());