X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.cpp;h=f393a1bb84dc06b7034235a88cb110b5879c96a9;hp=11b2b70bebc65e7503abc2dca66bf78bac54342a;hb=6f925ba9d6faf1077b73c5a5808259576081716a;hpb=067bb62415847791709f4c3cad8bb252a63f45f8 diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index 11b2b70..f393a1b 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -34,7 +34,6 @@ using std::lock_guard; using std::mutex; -using boost::optional; using std::unique_lock; using std::deque; using std::make_pair; @@ -47,6 +46,8 @@ using std::shared_ptr; using std::make_shared; using std::vector; +using boost::optional; + using namespace pv::data::decode; namespace pv { @@ -87,13 +88,12 @@ DecoderStack::~DecoderStack() } } -const std::list< std::shared_ptr >& -DecoderStack::stack() const +const list< shared_ptr >& DecoderStack::stack() const { return stack_; } -void DecoderStack::push(std::shared_ptr decoder) +void DecoderStack::push(shared_ptr decoder) { assert(decoder); stack_.push_back(decoder); @@ -129,7 +129,7 @@ int64_t DecoderStack::samples_decoded() const return samples_decoded_; } -std::vector DecoderStack::get_visible_rows() const +vector DecoderStack::get_visible_rows() const { lock_guard lock(output_mutex_); @@ -145,14 +145,14 @@ std::vector DecoderStack::get_visible_rows() const // Add a row for the decoder if it doesn't have a row list if (!decc->annotation_rows) - rows.push_back(Row(decc)); + rows.emplace_back(decc); // Add the decoder rows for (const GSList *l = decc->annotation_rows; l; l = l->next) { const srd_decoder_annotation_row *const ann_row = (srd_decoder_annotation_row *)l->data; assert(ann_row); - rows.push_back(Row(decc, ann_row)); + rows.emplace_back(decc, ann_row); } } @@ -160,7 +160,7 @@ std::vector DecoderStack::get_visible_rows() const } void DecoderStack::get_annotation_subset( - std::vector &dest, + vector &dest, const Row &row, uint64_t start_sample, uint64_t end_sample) const {