projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
051ba3b
)
AnalogSignal::paint_trace(): Factor out a const variable.
author
Uwe Hermann
<uwe@hermann-uwe.de>
Fri, 17 Mar 2017 22:00:04 +0000
(23:00 +0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Fri, 17 Mar 2017 22:56:05 +0000
(23:56 +0100)
pv/view/analogsignal.cpp
patch
|
blob
|
history
diff --git
a/pv/view/analogsignal.cpp
b/pv/view/analogsignal.cpp
index 399802b5e0f754ca0eebded3393344f52bb2e053..c393bc7cdc00adc9a5b0062530e53cfba1a98a02 100644
(file)
--- a/
pv/view/analogsignal.cpp
+++ b/
pv/view/analogsignal.cpp
@@
-277,7
+277,9
@@
void AnalogSignal::paint_trace(QPainter &p,
{
p.setPen(base_->colour());
- QPointF *points = new QPointF[end - start];
+ const int64_t points_count = end - start;
+
+ QPointF *points = new QPointF[points_count];
QPointF *point = points;
pv::data::SegmentAnalogDataIterator* it =
@@
-292,7
+294,7
@@
void AnalogSignal::paint_trace(QPainter &p,
}
segment->end_sample_iteration(it);
- p.drawPolyline(points, point
- points
);
+ p.drawPolyline(points, point
s_count
);
delete[] points;
}