diff options
author | Chris Robinson <[email protected]> | 2019-05-25 08:17:37 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-05-25 08:17:37 -0700 |
commit | ebf33b7c6b747b647eb2177080dc6f46db89867b (patch) | |
tree | 8956a70fe8b3153624129172c12ac12fffa603f3 /Alc/mixer/mixer_c.cpp | |
parent | 219f818b165d6997d6a2f1f8f0c5f88ba68a5db2 (diff) |
Avoid some uses of RESTRICT
Diffstat (limited to 'Alc/mixer/mixer_c.cpp')
-rw-r--r-- | Alc/mixer/mixer_c.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp index 1c22115d..6ee5df88 100644 --- a/Alc/mixer/mixer_c.cpp +++ b/Alc/mixer/mixer_c.cpp @@ -12,13 +12,15 @@ #include "hrtfbase.h" -static inline ALfloat do_point(const InterpState&, const ALfloat *RESTRICT vals, const ALsizei) noexcept +namespace { + +inline ALfloat do_point(const InterpState&, const ALfloat *RESTRICT vals, const ALsizei) noexcept { return vals[0]; } -static inline ALfloat do_lerp(const InterpState&, const ALfloat *RESTRICT vals, const ALsizei frac) noexcept +inline ALfloat do_lerp(const InterpState&, const ALfloat *RESTRICT vals, const ALsizei frac) noexcept { return lerp(vals[0], vals[1], frac * (1.0f/FRACTIONONE)); } -static inline ALfloat do_cubic(const InterpState&, const ALfloat *RESTRICT vals, const ALsizei frac) noexcept +inline ALfloat do_cubic(const InterpState&, const ALfloat *RESTRICT vals, const ALsizei frac) noexcept { return cubic(vals[0], vals[1], vals[2], vals[3], frac * (1.0f/FRACTIONONE)); } -static inline ALfloat do_bsinc(const InterpState &istate, const ALfloat *RESTRICT vals, const ALsizei frac) noexcept +inline ALfloat do_bsinc(const InterpState &istate, const ALfloat *RESTRICT vals, const ALsizei frac) noexcept { ASSUME(istate.bsinc.m > 0); @@ -42,9 +44,8 @@ static inline ALfloat do_bsinc(const InterpState &istate, const ALfloat *RESTRIC using SamplerT = ALfloat(const InterpState&, const ALfloat*RESTRICT, const ALsizei); template<SamplerT &Sampler> -static const ALfloat *DoResample(const InterpState *state, const ALfloat *RESTRICT src, - ALsizei frac, ALint increment, ALfloat *RESTRICT dst, - ALsizei numsamples) +const ALfloat *DoResample(const InterpState *state, const ALfloat *RESTRICT src, + ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei numsamples) { ASSUME(numsamples > 0); ASSUME(increment > 0); @@ -61,11 +62,12 @@ static const ALfloat *DoResample(const InterpState *state, const ALfloat *RESTRI return ret; }; - std::generate_n<ALfloat*RESTRICT>(dst, numsamples, proc_sample); + std::generate_n(dst, numsamples, proc_sample); return dst; } +} // namespace template<> const ALfloat *Resample_<CopyTag,CTag>(const InterpState* UNUSED(state), |