diff options
author | Marcus Müller <marcus@hostalia.de> | 2018-08-25 16:28:42 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-08-28 19:00:43 +0200 |
commit | 1f857d30d5d73576070d70ad785cba3d505b2a73 (patch) | |
tree | d8bd9b473eadeb5a6cfd5be5602de08c46ddfd99 /gr-qtgui/lib/VectorDisplayPlot.cc | |
parent | 83ac1f47ebe77eadda89c0e5482311217d72a204 (diff) |
Use unsigned integers where dealing with indices
This is to improve quality of warnings when trying to pass negative
indices.
Diffstat (limited to 'gr-qtgui/lib/VectorDisplayPlot.cc')
-rw-r--r-- | gr-qtgui/lib/VectorDisplayPlot.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-qtgui/lib/VectorDisplayPlot.cc b/gr-qtgui/lib/VectorDisplayPlot.cc index 54d5c49acc..009233b3e6 100644 --- a/gr-qtgui/lib/VectorDisplayPlot.cc +++ b/gr-qtgui/lib/VectorDisplayPlot.cc @@ -124,7 +124,7 @@ VectorDisplayPlot::VectorDisplayPlot(int nplots, QWidget* parent) // Create a curve for each input // Automatically deleted when parent is deleted - for(int i = 0; i < d_nplots; i++) { + for(unsigned int i = 0; i < d_nplots; ++i) { d_ydata.push_back(new double[d_numPoints]); memset(d_ydata[i], 0x0, d_numPoints*sizeof(double)); @@ -235,7 +235,7 @@ VectorDisplayPlot::VectorDisplayPlot(int nplots, QWidget* parent) VectorDisplayPlot::~VectorDisplayPlot() { - for(int i = 0; i < d_nplots; i++) + for(unsigned int i = 0; i < d_nplots; ++i) delete [] d_ydata[i]; delete[] d_max_vec_data; delete[] d_min_vec_data; @@ -340,7 +340,7 @@ VectorDisplayPlot::plotNewData( d_min_vec_data = new double[d_numPoints]; d_max_vec_data = new double[d_numPoints]; - for(int i = 0; i < d_nplots; i++) { + for(unsigned int i = 0; i < d_nplots; ++i) { delete[] d_ydata[i]; d_ydata[i] = new double[d_numPoints]; @@ -363,7 +363,7 @@ VectorDisplayPlot::plotNewData( } double bottom=1e20, top=-1e20; - for(int n = 0; n < d_nplots; n++) { + for(unsigned int n = 0; n < d_nplots; ++n) { memcpy(d_ydata[n], dataPoints[n], numDataPoints*sizeof(double)); |