mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 19:45:41 -04:00
[librpbyteswap] byteswap_rp.h, __swabf(): Initialize the union to 0.
This doesn't affect the compiled output, but it's needed by gcc-5.4 in order to be marked as constexpr. The uninitialized union *is* allowed as of C++20, supported in gcc-10.1 and later.
This commit is contained in:
parent
3d0fd3627b
commit
7efa014ba8
@ -134,7 +134,7 @@ static inline float __swabf(float f)
|
||||
union {
|
||||
uint32_t u32;
|
||||
float f;
|
||||
} u32_f;
|
||||
} u32_f = { 0 };
|
||||
u32_f.f = f;
|
||||
u32_f.u32 = __swab32(u32_f.u32);
|
||||
return u32_f.f;
|
||||
|
Loading…
Reference in New Issue
Block a user