From: Joel Holdsworth Date: Sat, 29 Nov 2014 18:23:57 +0000 (+0000) Subject: Renamed pv::data::Analog::get_snapshots and Logic::get_snapshots X-Git-Tag: pulseview-0.3.0~398 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1df18f6b6d20abd3f1ede94325b6781bf5038ea9;p=pulseview.git Renamed pv::data::Analog::get_snapshots and Logic::get_snapshots --- diff --git a/pv/data/analog.cpp b/pv/data/analog.cpp index 30cf5013..dba99253 100644 --- a/pv/data/analog.cpp +++ b/pv/data/analog.cpp @@ -40,7 +40,7 @@ void Analog::push_snapshot(shared_ptr &snapshot) snapshots_.push_front(snapshot); } -deque< shared_ptr >& Analog::get_snapshots() +const deque< shared_ptr >& Analog::analog_snapshots() const { return snapshots_; } diff --git a/pv/data/analog.hpp b/pv/data/analog.hpp index cfc964e1..c0c6bd6f 100644 --- a/pv/data/analog.hpp +++ b/pv/data/analog.hpp @@ -39,8 +39,8 @@ public: void push_snapshot( std::shared_ptr &snapshot); - std::deque< std::shared_ptr >& - get_snapshots(); + const std::deque< std::shared_ptr >& + analog_snapshots() const; void clear(); diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index c179b24a..e0b16573 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -245,7 +245,7 @@ void DecoderStack::begin_decode() // Check we have a snapshot of data const deque< shared_ptr > &snapshots = - data->get_snapshots(); + data->logic_snapshots(); if (snapshots.empty()) return; snapshot_ = snapshots.front(); diff --git a/pv/data/logic.cpp b/pv/data/logic.cpp index 8f1d294d..8b864f76 100644 --- a/pv/data/logic.cpp +++ b/pv/data/logic.cpp @@ -48,7 +48,7 @@ void Logic::push_snapshot( snapshots_.push_front(snapshot); } -deque< shared_ptr >& Logic::get_snapshots() +const deque< shared_ptr >& Logic::logic_snapshots() const { return snapshots_; } diff --git a/pv/data/logic.hpp b/pv/data/logic.hpp index 51e12cb9..a5185071 100644 --- a/pv/data/logic.hpp +++ b/pv/data/logic.hpp @@ -41,8 +41,8 @@ public: void push_snapshot( std::shared_ptr &snapshot); - std::deque< std::shared_ptr >& - get_snapshots(); + const std::deque< std::shared_ptr >& + logic_snapshots() const; void clear(); diff --git a/pv/storesession.cpp b/pv/storesession.cpp index 2e90871c..46dddcd6 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -108,7 +108,7 @@ bool StoreSession::start() // Get the snapshot const deque< shared_ptr > &snapshots = - data->get_snapshots(); + data->logic_snapshots(); if (snapshots.empty()) { error_ = tr("No snapshots to save."); diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index 5d838506..c4d31cb6 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -104,7 +104,7 @@ void AnalogSignal::paint_mid(QPainter &p, const RowItemPaintParams &pp) return; const deque< shared_ptr > &snapshots = - data_->get_snapshots(); + data_->analog_snapshots(); if (snapshots.empty()) return; diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 0b4cd7c5..6f14732d 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -481,11 +481,11 @@ void DecodeTrace::draw_unresolved_period(QPainter &p, int h, int left, ((data = logic_signal->logic_data()))) break; - if (!data || data->get_snapshots().empty()) + if (!data || data->logic_snapshots().empty()) return; const shared_ptr snapshot = - data->get_snapshots().front(); + data->logic_snapshots().front(); assert(snapshot); const int64_t sample_count = (int64_t)snapshot->get_sample_count(); if (sample_count == 0) diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 3acf1b5c..79f8457a 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -170,7 +170,7 @@ void LogicSignal::paint_mid(QPainter &p, const RowItemPaintParams &pp) const float low_offset = y + 0.5f; const deque< shared_ptr > &snapshots = - data_->get_snapshots(); + data_->logic_snapshots(); if (snapshots.empty()) return;