1
0
Fork 0

Fix signed/unsigned missmatch.

This commit is contained in:
Thomas Geymayer 2013-09-08 13:49:09 +02:00
parent 7e117d2558
commit 39c129cee6

View file

@ -223,7 +223,8 @@ void MovingAverageFilterImplementation::initialize( double initvalue )
double MovingAverageFilterImplementation::compute( double dt, double input )
{
std::deque<double>::size_type samples = _samplesInput.get_value();
typedef std::deque<double>::size_type size_type;
size_type samples = _samplesInput.get_value();
if (_inputQueue.size() != samples) {
// For constant size filters, this code executed once.
@ -231,7 +232,7 @@ double MovingAverageFilterImplementation::compute( double dt, double input )
_inputQueue.resize(samples, _output_1);
if (shrunk) {
_output_1 = 0.0;
for (int ii = 0; ii < samples; ii++)
for (size_type ii = 0; ii < samples; ii++)
_output_1 += _inputQueue[ii];
_output_1 /= samples;
}