Skip to content

Commit

Permalink
Add static casts to fix float/double conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-13 committed Dec 23, 2018
1 parent aedab10 commit 995e76f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WECore/WEFilters/TPTSVFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ namespace WECore::TPTSVF {

switch (_mode) {
case Parameters::ModeParameter::PEAK:
inSamples[idx] = yB * _gain;
inSamples[idx] = yB * static_cast<T>(_gain);
break;

case Parameters::ModeParameter::HIGHPASS:
inSamples[idx] = yH * _gain;
inSamples[idx] = yH * static_cast<T>(_gain);
break;

default:
inSamples[idx] = yL * _gain;
inSamples[idx] = yL * static_cast<T>(_gain);
break;
}
}
Expand Down

0 comments on commit 995e76f

Please sign in to comment.