projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix catching polymorphic types by value
[pulseview.git]
/
pv
/
views
/
trace
/
analogsignal.cpp
diff --git
a/pv/views/trace/analogsignal.cpp
b/pv/views/trace/analogsignal.cpp
index 11a73068b25c13bb7724971a57aad8775796e38b..3595840ecfebbf211df9c1cc5d67155329f5a65a 100644
(file)
--- a/
pv/views/trace/analogsignal.cpp
+++ b/
pv/views/trace/analogsignal.cpp
@@
-47,7
+47,6
@@
#include <libsigrokcxx/libsigrokcxx.hpp>
#include <libsigrokcxx/libsigrokcxx.hpp>
-using std::bind;
using std::deque;
using std::div;
using std::div_t;
using std::deque;
using std::div;
using std::div_t;
@@
-57,7
+56,6
@@
using std::min;
using std::numeric_limits;
using std::out_of_range;
using std::pair;
using std::numeric_limits;
using std::out_of_range;
using std::pair;
-using std::placeholders::_1;
using std::shared_ptr;
using std::vector;
using std::shared_ptr;
using std::vector;
@@
-449,8
+447,7
@@
void AnalogSignal::paint_trace(QPainter &p,
}
}
}
}
- sampling_points[idx].push_back(
- QRectF(x - (w / 2), y - sample_block[block_sample] * scale_ - (w / 2), w, w));
+ sampling_points[idx].emplace_back(x - (w / 2), y - sample_block[block_sample] * scale_ - (w / 2), w, w);
}
}
delete[] sample_block;
}
}
delete[] sample_block;
@@
-672,7
+669,7
@@
shared_ptr<pv::data::AnalogSegment> AnalogSignal::get_analog_segment_to_paint()
(segment_display_mode_ == ShowLastCompleteSegmentOnly)) {
try {
segment = segments.at(current_segment_);
(segment_display_mode_ == ShowLastCompleteSegmentOnly)) {
try {
segment = segments.at(current_segment_);
- } catch (out_of_range) {
+ } catch (out_of_range
&
) {
qDebug() << "Current analog segment out of range for signal" << base_->name() << ":" << current_segment_;
}
}
qDebug() << "Current analog segment out of range for signal" << base_->name() << ":" << current_segment_;
}
}
@@
-696,7
+693,7
@@
shared_ptr<pv::data::LogicSegment> AnalogSignal::get_logic_segment_to_paint() co
(segment_display_mode_ == ShowLastCompleteSegmentOnly)) {
try {
segment = segments.at(current_segment_);
(segment_display_mode_ == ShowLastCompleteSegmentOnly)) {
try {
segment = segments.at(current_segment_);
- } catch (out_of_range) {
+ } catch (out_of_range
&
) {
qDebug() << "Current logic segment out of range for signal" << base_->name() << ":" << current_segment_;
}
}
qDebug() << "Current logic segment out of range for signal" << base_->name() << ":" << current_segment_;
}
}