From b4d56d3fdff4243ae2a3fc64934ced2af3187690 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 28 Jul 2019 17:15:34 -0700 Subject: Remove the UNUSED macro --- Alc/effects/vmorpher.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Alc/effects/vmorpher.cpp') 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(index) * - (al::MathDefs::Tau() / ALfloat{WAVEFORM_FRACONE})))*0.5f+0.5f; + constexpr ALfloat scale{al::MathDefs::Tau() / ALfloat{WAVEFORM_FRACONE}}; + return std::sin(static_cast(index) * scale)*0.5f + 0.5f; } inline ALfloat Saw(ALsizei index) { - return (static_cast(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f)*0.5f+0.5f; + return static_cast(index) / ALfloat{WAVEFORM_FRACONE}; } inline ALfloat Triangle(ALsizei index) { - return (std::fabs(static_cast(index) * (al::MathDefs::Tau() / WAVEFORM_FRACONE) - - al::MathDefs::Pi()) / al::MathDefs::Pi())*0.5f+0.5f; + return std::fabs(static_cast(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f); } -inline ALfloat Half(ALsizei UNUSED(index)) +inline ALfloat Half(ALsizei) { return 0.5f; } -- cgit v1.2.3