ModeFilter - corrected shadowed variable compiler warning for drop_high_sample

This commit is contained in:
rmackay9 2012-02-26 17:57:28 +09:00
parent b9b88ba237
commit 297d2ae457
1 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ T ModeFilter<T>::apply(T sample)
// drops either the highest or lowest sample depending on the 'drop_high_sample' parameter
//
template <class T>
void ModeFilter<T>::isort(T new_sample, bool drop_high_sample)
void ModeFilter<T>::isort(T new_sample, bool drop_high)
{
int8_t i;
@ -84,10 +84,10 @@ void ModeFilter<T>::isort(T new_sample, bool drop_high_sample)
// the rest is the same as dropping the high sample
if( Filter<T>::sample_index < Filter<T>::filter_size ) {
Filter<T>::sample_index++;
drop_high_sample = true;
drop_high = true;
}
if( drop_high_sample ) { // drop highest sample from the buffer to make room for our new sample
if( drop_high ) { // drop highest sample from the buffer to make room for our new sample
// start from top. Note: sample_index always points to the next open space so we start from sample_index-1
i = Filter<T>::sample_index-1;