diff options
-rw-r--r-- | gr-qtgui/lib/spectrumdisplayform.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-qtgui/lib/spectrumdisplayform.cc b/gr-qtgui/lib/spectrumdisplayform.cc index 0e8594029..d3ca01483 100644 --- a/gr-qtgui/lib/spectrumdisplayform.cc +++ b/gr-qtgui/lib/spectrumdisplayform.cc @@ -466,7 +466,8 @@ SpectrumDisplayForm::_AverageHistory(const double* newBuffer) if(_historyEntryCount > static_cast<int>(_historyVector->size())){ _historyEntryCount = _historyVector->size(); } - _historyEntry = (++_historyEntry)%_historyVector->size(); + _historyEntry += 1; + _historyEntry = _historyEntry % _historyVector->size(); // Total up and then average the values double sum; |