for (const GSList *rl = srd_decoder_->annotation_rows; rl; rl = rl->next) {
const srd_decoder_annotation_row *const srd_row = (srd_decoder_annotation_row *)rl->data;
assert(srd_row);
- rows_.push_back({i++, this, srd_row});
+ rows_.emplace_back(i++, this, srd_row);
// FIXME PV can crash from .at() if a PD's ann classes are defined incorrectly
for (const GSList *cl = srd_row->ann_classes; cl; cl = cl->next)
if (rows_.empty()) {
// Make sure there is a row for PDs without row declarations
- rows_.push_back({0, this});
+ rows_.emplace_back(0, this);
for (AnnotationClass& c : ann_classes_)
c.row = &(rows_.back());
using std::forward_list;
using std::lock_guard;
-using std::make_pair;
using std::make_shared;
using std::min;
using std::out_of_range;
segments_.emplace_back(DecodeSegment());
// Add annotation classes
- for (const shared_ptr<Decoder> dec : stack_)
+ for (const shared_ptr<Decoder>& dec : stack_)
for (Row* row : dec->get_rows())
segments_.back().annotation_rows.emplace(row, RowData(row));
using std::deque;
using std::map;
using std::mutex;
-using std::pair;
using std::vector;
using std::shared_ptr;
// Only use the view type in the name if it's not the main view
QString title;
if (main_bar)
- title = QString("%1 (%2)").arg(session.name()).arg(views::ViewTypeNames[type]);
+ title = QString("%1 (%2)").arg(session.name(), views::ViewTypeNames[type]);
else
title = session.name();
};
public:
- QHexView(QWidget *parent = 0);
+ QHexView(QWidget *parent = nullptr);
void set_mode(Mode m);
void set_data(const DecodeBinaryClass* data);
using pv::data::DecodeSignal;
using pv::data::SignalBase;
using pv::data::decode::Decoder;
-using pv::util::TimeUnit;
using pv::util::Timestamp;
-using std::dynamic_pointer_cast;
-using std::numeric_limits;
using std::shared_ptr;
namespace pv {
reset_view_state();
}
-View::~View()
-{
-}
-
ViewType View::get_type() const
{
return ViewTypeDecoderOutput;
public:
explicit View(Session &session, bool is_main_view=false, QMainWindow *parent = nullptr);
- ~View();
-
virtual ViewType get_type() const;
/**
using std::max;
using std::min;
using std::numeric_limits;
-using std::out_of_range;
using std::pair;
using std::shared_ptr;
using std::tie;
{
shared_ptr<Signal> ret_val;
- for (const shared_ptr<Signal> s : signals_)
+ for (const shared_ptr<Signal>& s : signals_)
if (s->base() == base) {
ret_val = s;
break;
if ((index >= 0) && (index < itemList.size()))
return itemList.takeAt(index);
else
- return 0;
+ return nullptr;
}
Qt::Orientations FlowLayout::expandingDirections() const
if (parent->isWidgetType()) {
QWidget *pw = qobject_cast<QWidget*>(parent);
- return pw->style()->pixelMetric(pm, 0, pw);
+ return pw->style()->pixelMetric(pm, nullptr, pw);
} else
return static_cast<QLayout*>(parent)->spacing();
}