diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2019-07-28 17:15:34 -0700 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2019-07-28 17:15:34 -0700 |
commit | b4d56d3fdff4243ae2a3fc64934ced2af3187690 (patch) | |
tree | 9a9809e2e991037aa5798a05ab7321d143b95e5f /Alc/effects/vmorpher.cpp | |
parent | c8bbd75bf9a6f0170ec95b130b3eb17cd8cdd5ad (diff) |
Remove the UNUSED macro
Diffstat (limited to 'Alc/effects/vmorpher.cpp')
-rw-r--r-- | Alc/effects/vmorpher.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Alc/effects/vmorpher.cpp b/Alc/effects/vmorpher.cpp index dc402aaf..6f7e22ae 100644 --- a/Alc/effects/vmorpher.cpp +++ b/Alc/effects/vmorpher.cpp @@ -47,22 +47,21 @@ namespace { inline ALfloat Sin(ALsizei index) { - return (std::sin(static_cast<ALfloat>(index) * - (al::MathDefs<float>::Tau() / ALfloat{WAVEFORM_FRACONE})))*0.5f+0.5f; + constexpr ALfloat scale{al::MathDefs<float>::Tau() / ALfloat{WAVEFORM_FRACONE}}; + return std::sin(static_cast<ALfloat>(index) * scale)*0.5f + 0.5f; } inline ALfloat Saw(ALsizei index) { - return (static_cast<ALfloat>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f)*0.5f+0.5f; + return static_cast<ALfloat>(index) / ALfloat{WAVEFORM_FRACONE}; } inline ALfloat Triangle(ALsizei index) { - return (std::fabs(static_cast<ALfloat>(index) * (al::MathDefs<float>::Tau() / WAVEFORM_FRACONE) - - al::MathDefs<float>::Pi()) / al::MathDefs<float>::Pi())*0.5f+0.5f; + return std::fabs(static_cast<ALfloat>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f); } -inline ALfloat Half(ALsizei UNUSED(index)) +inline ALfloat Half(ALsizei) { return 0.5f; } |