From: Mikko Rasa Date: Sat, 16 Sep 2023 13:05:29 +0000 (+0300) Subject: Tweak some types to work around an MSVC compile error X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=ext%2Fopenal.git Tweak some types to work around an MSVC compile error For some reason in release mode MSVC wants to decay the plain arrays to pointers when used in a ternary, which causes the code expecting a reference to an array to not compile. --- diff --git a/core/ambdec.h b/core/ambdec.h index 7f73978..d2133f7 100644 --- a/core/ambdec.h +++ b/core/ambdec.h @@ -41,10 +41,10 @@ struct AmbDecConf { std::unique_ptr Matrix; /* Unused when FreqBands == 1 */ - float LFOrderGain[MaxAmbiOrder+1]{}; + std::array LFOrderGain{}; CoeffArray *LFMatrix; - float HFOrderGain[MaxAmbiOrder+1]{}; + std::array HFOrderGain{}; CoeffArray *HFMatrix; ~AmbDecConf();