Fix issue for union with visual & clang-cl

This commit is contained in:
Patrick Pelissier committed 2021-03-20 13:16:10 +01:00
1 parent 59807baa18
commit 8433fc178c
1 file changed
+5 -1
+5 -1
View File
@@ -130,9 +130,13 @@ typedef enum {
of atomic operations if the buffer is not thread safe.
*/
typedef union {
typedef union m_buff3r_number_s {
unsigned int u;
atomic_uint a;
#ifdef __cplusplus
// Not sure why, but C++ needs an explicit default constructor for this union.
m_buff3r_number_s() : u(0) {};
#endif
} m_buff3r_number_ct[1];
static inline void