From 582e7c0aade1f929cf0f02a90ad70b0d6f8834fb Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Mon, 30 Nov 2020 13:50:18 +0000 Subject: Drop use of QVector in MovingAverage Change-Id: Iba91d91d4fcd292d1e1bb388db63800893c59fc8 Reviewed-by: Paul Lemire --- src/input/backend/movingaverage.cpp | 2 +- src/input/backend/movingaverage_p.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/backend/movingaverage.cpp b/src/input/backend/movingaverage.cpp index 36b204341..7a9b0d53e 100644 --- a/src/input/backend/movingaverage.cpp +++ b/src/input/backend/movingaverage.cpp @@ -56,7 +56,7 @@ MovingAverage::MovingAverage(unsigned int samples) void MovingAverage::addSample(float sample) { if (m_sampleCount == m_maxSampleCount) - m_total -= m_samples.at(m_currentSample); + m_total -= m_samples[m_currentSample]; else ++m_sampleCount; diff --git a/src/input/backend/movingaverage_p.h b/src/input/backend/movingaverage_p.h index 67b2ec559..f7a89907a 100644 --- a/src/input/backend/movingaverage_p.h +++ b/src/input/backend/movingaverage_p.h @@ -52,7 +52,8 @@ // #include -#include + +#include QT_BEGIN_NAMESPACE @@ -73,7 +74,7 @@ private: unsigned int m_sampleCount; unsigned int m_currentSample; float m_total; - QVector m_samples; + std::vector m_samples; }; } // Input -- cgit v1.2.3