]> git.tdb.fi Git - ext/openal.git/commitdiff
Tweak some types to work around an MSVC compile error master
authorMikko Rasa <tdb@tdb.fi>
Sat, 16 Sep 2023 13:05:29 +0000 (16:05 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 16 Sep 2023 13:05:29 +0000 (16:05 +0300)
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.

core/ambdec.h

index 7f7397817c1577295fd7967faa325f47e617692c..d2133f7a526b9170784d1b61f71f1637548f6efd 100644 (file)
@@ -41,10 +41,10 @@ struct AmbDecConf {
     std::unique_ptr<CoeffArray[]> Matrix;
 
     /* Unused when FreqBands == 1 */
-    float LFOrderGain[MaxAmbiOrder+1]{};
+    std::array<float,MaxAmbiOrder+1> LFOrderGain{};
     CoeffArray *LFMatrix;
 
-    float HFOrderGain[MaxAmbiOrder+1]{};
+    std::array<float,MaxAmbiOrder+1> HFOrderGain{};
     CoeffArray *HFMatrix;
 
     ~AmbDecConf();