diff options
author | Thomas Habets <thomas@habets.se> | 2021-04-04 14:55:13 +0100 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2021-04-06 12:04:06 -0700 |
commit | c9ebbd857f0bd715080fd997f1c465d8713555b8 (patch) | |
tree | 3922a63c4bac54a17dbd464165ca7a045e6205be | |
parent | 25fbde1fac0624597941dc2516fb4eeba2564d28 (diff) |
qtgui: Use ranged constructor instead of resize©
Signed-off-by: Thomas Habets <thomas@habets.se>
-rw-r--r-- | gr-qtgui/lib/EyeDisplayPlot.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gr-qtgui/lib/EyeDisplayPlot.cc b/gr-qtgui/lib/EyeDisplayPlot.cc index f336b23709..f830a85840 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); |