1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-01 22:41:32 +00:00

Switches a couple of overlooked C-style casts to functional style.

This commit is contained in:
Thomas Harte 2017-11-11 12:41:49 -05:00
parent fd346bac3e
commit 6a176082a0
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ void FIRFilter::coefficients_for_idealised_filter_response(short *filter_coeffic
/* we'll also need integer versions, potentially */
float coefficientMultiplier = 1.0f / coefficientTotal;
for(size_t i = 0; i < number_of_taps; ++i) {
filter_coefficients[i] = (short)(filter_coefficients_float[i] * FixedMultiplier * coefficientMultiplier);
filter_coefficients[i] = static_cast<short>(filter_coefficients_float[i] * FixedMultiplier * coefficientMultiplier);
}
}

View File

@ -60,7 +60,7 @@ class FIRFilter {
for(size_t c = 0; c < filter_coefficients_.size(); ++c) {
outputValue += filter_coefficients_[c] * src[c];
}
return (short)(outputValue >> FixedShift);
return static_cast<short>(outputValue >> FixedShift);
#endif
}