From 0d3a0635d946ab1f43fd98cec4882248bc990846 Mon Sep 17 00:00:00 2001
From: Filip Gawin <filip.gawin@zoho.com>
Date: Tue, 8 Jan 2019 19:42:44 +0100
Subject: Avoid using old style casts

To think about:
examples/alffplay.cpp:600
OpenAL32/Include/alMain.h:295
---
 Alc/effects/reverb.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'Alc/effects/reverb.cpp')

diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index 6f1b1bb1..a63cc4c3 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -359,7 +359,7 @@ inline ALvoid RealizeLineOffset(ALfloat *sampleBuffer, DelayLineI *Delay)
         ALfloat *f;
         ALfloat (*f4)[NUM_LINES];
     } u;
-    u.f = &sampleBuffer[(ptrdiff_t)Delay->Line * NUM_LINES];
+    u.f = &sampleBuffer[reinterpret_cast<ptrdiff_t>(Delay->Line) * NUM_LINES];
     Delay->Line = u.f4;
 }
 
@@ -377,7 +377,7 @@ ALuint CalcLineLength(const ALfloat length, const ptrdiff_t offset, const ALuint
 
     /* All lines share a single sample buffer. */
     Delay->Mask = samples - 1;
-    Delay->Line = (ALfloat(*)[NUM_LINES])offset;
+    Delay->Line = reinterpret_cast<ALfloat(*)[NUM_LINES]>(offset);
 
     /* Return the sample count for accumulation. */
     return samples;
@@ -658,7 +658,7 @@ ALvoid UpdateLateLines(const ALfloat density, const ALfloat diffusion, const ALf
     /* Scaling factor to convert the normalized reference frequencies from
      * representing 0...freq to 0...max_reference.
      */
-    const ALfloat norm_weight_factor = (ALfloat)frequency / AL_EAXREVERB_MAX_HFREFERENCE;
+    const ALfloat norm_weight_factor = static_cast<ALfloat>(frequency) / AL_EAXREVERB_MAX_HFREFERENCE;
 
     /* To compensate for changes in modal density and decay time of the late
      * reverb signal, the input is attenuated based on the maximal energy of
-- 
cgit v1.2.3