aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-08-15 23:22:10 -0700
committerChris Robinson <[email protected]>2020-08-15 23:22:10 -0700
commit23259b48dd36ea91f3a2bddd32122b35b1469e4c (patch)
treed126dd0c8bf81d854bf97672e8d1bbe87d59e3c5 /alc
parent2fa842a04c8f4217658ae2473cec1f7f45e999bb (diff)
Avoid a zero-length array for the FlexArray definition
Newer GCCs are warning about FlexArray being used at the end of another struct. Though not the most ideal to always allocate space for at least 1 element, actual 0-sized uses are rare and for smaller element types.
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index e9405493..c349a4ba 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -947,13 +947,9 @@ constexpr int alcEFXMinorVersion{0};
/* To avoid extraneous allocations, a 0-sized FlexArray<ALCcontext*> is defined
- * globally as a sharable object. MSVC warns that a zero-sized array will have
- * zero objects here, so silence that.
+ * globally as a sharable object.
*/
-DIAGNOSTIC_PUSH
-msc_pragma(warning(disable : 4815))
al::FlexArray<ALCcontext*> EmptyContextArray{0u};
-DIAGNOSTIC_POP
using DeviceRef = al::intrusive_ptr<ALCdevice>;