diff options
author | Ryan Volz <ryan.volz@gmail.com> | 2021-04-12 14:43:25 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-04-17 19:52:46 -0400 |
commit | ea9a86153ba48697ff3cf81e7d002433af93c9ac (patch) | |
tree | a6c78d78ecacdbad7726c12cefb458c940e1d2e8 /gr-qtgui | |
parent | runtime, blocks, network: Clean up use of Win headers, fix stream_pdu. (diff) | |
download | gnuradio-ea9a86153ba48697ff3cf81e7d002433af93c9ac.tar.xz gnuradio-ea9a86153ba48697ff3cf81e7d002433af93c9ac.zip |
qtgui: lib: Remove ssize_t for portability.
Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
Diffstat (limited to 'gr-qtgui')
-rw-r--r-- | gr-qtgui/lib/timeRasterGlobalData.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gr-qtgui/lib/timeRasterGlobalData.cc b/gr-qtgui/lib/timeRasterGlobalData.cc index def179dd7..cc48a49bd 100644 --- a/gr-qtgui/lib/timeRasterGlobalData.cc +++ b/gr-qtgui/lib/timeRasterGlobalData.cc @@ -139,8 +139,6 @@ void TimeRasterData::setRange(const QwtDoubleInterval& newRange) double TimeRasterData::value(double x, double y) const { - double returnValue = 0.0; - #if QWT_VERSION < 0x060000 double top = boundingRect().top(); double bottom = top - boundingRect().height(); @@ -158,13 +156,13 @@ double TimeRasterData::value(double x, double y) const double _y = floor(top - y); double _loc = _y * (d_cols) + x + d_resid; - auto location = static_cast<ssize_t>(_loc); + const auto location = static_cast<size_t>(_loc); - if ((location > -1) && (location < static_cast<ssize_t>(d_data.size()))) { - returnValue = d_data[location]; + if (location < d_data.size()) { + return d_data[location]; } - return returnValue; + return 0.0; } void TimeRasterData::incrementResidual() |