mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
Switches a couple of overlooked C-style casts to functional style.
This commit is contained in:
parent
fd346bac3e
commit
6a176082a0
@ -86,7 +86,7 @@ void FIRFilter::coefficients_for_idealised_filter_response(short *filter_coeffic
|
|||||||
/* we'll also need integer versions, potentially */
|
/* we'll also need integer versions, potentially */
|
||||||
float coefficientMultiplier = 1.0f / coefficientTotal;
|
float coefficientMultiplier = 1.0f / coefficientTotal;
|
||||||
for(size_t i = 0; i < number_of_taps; ++i) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class FIRFilter {
|
|||||||
for(size_t c = 0; c < filter_coefficients_.size(); ++c) {
|
for(size_t c = 0; c < filter_coefficients_.size(); ++c) {
|
||||||
outputValue += filter_coefficients_[c] * src[c];
|
outputValue += filter_coefficients_[c] * src[c];
|
||||||
}
|
}
|
||||||
return (short)(outputValue >> FixedShift);
|
return static_cast<short>(outputValue >> FixedShift);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user