mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +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 */
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user