aboutsummaryrefslogtreecommitdiffstats
path: root/gr-qtgui
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2021-04-04 14:55:13 +0100
committerMartin Braun <martin@gnuradio.org>2021-04-06 12:04:06 -0700
commitc9ebbd857f0bd715080fd997f1c465d8713555b8 (patch)
tree3922a63c4bac54a17dbd464165ca7a045e6205be /gr-qtgui
parentqtgui: Remove manual memory management from VectorDisplayPlot (diff)
downloadgnuradio-c9ebbd857f0bd715080fd997f1c465d8713555b8.tar.xz
gnuradio-c9ebbd857f0bd715080fd997f1c465d8713555b8.zip
qtgui: Use ranged constructor instead of resize&copy
Signed-off-by: Thomas Habets <thomas@habets.se>
Diffstat (limited to 'gr-qtgui')
-rw-r--r--gr-qtgui/lib/EyeDisplayPlot.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/gr-qtgui/lib/EyeDisplayPlot.cc b/gr-qtgui/lib/EyeDisplayPlot.cc
index f336b2370..f830a8584 100644
--- a/gr-qtgui/lib/EyeDisplayPlot.cc
+++ b/gr-qtgui/lib/EyeDisplayPlot.cc
@@ -235,11 +235,9 @@ void EyeDisplayPlot::plotNewData(const std::vector<double*> dataPoints,
// New data structure and data
for (unsigned int i = 0; i < d_numPeriods; ++i) {
int64_t time_index = i * (d_numPointsPerPeriod - 1);
- d_ydata.emplace_back(d_numPointsPerPeriod);
- // TODO: init copy.
- memcpy(d_ydata[i].data(),
- &(dataPoints[d_curve_index][time_index]),
- d_numPointsPerPeriod * sizeof(double));
+ d_ydata.emplace_back(
+ &dataPoints[d_curve_index][time_index],
+ &dataPoints[d_curve_index][time_index + d_numPointsPerPeriod]);
d_plot_curve.push_back(
new QwtPlotCurve(QString("Eye [Data %1]").arg(d_curve_index)));
d_plot_curve[i]->attach(this);