Declare size variable #3

Merged
merged 1 commit into from Oct 1, 2012
View
1 include/fplib/FloatingAverage.h
@@ -82,6 +82,7 @@ class FloatingAverage
{
T real_sum = 0;
const T* pCircularBuffer = m_values.get_buffer();
+ const int size = m_values.size();
for ( int i = 0; i < size; ++i )
real_sum += pCircularBuffer[i];
return abs(real_sum - m_sum) / this->size();