2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-13 06:06:09 +00:00

RuntimeCommonB: Make use of bitfield initializers where applicable

Given that we now target C++20, we can make use of bitfield initializers
where applicable.
This commit is contained in:
Lioncash
2020-04-20 00:57:50 -04:00
parent 2103c38f54
commit 554893ef85
184 changed files with 587 additions and 1117 deletions

View File

@@ -32,10 +32,10 @@ struct SAdsrData {
float xc_decayDur = 0.f;
float x10_sustainGain = 0.f;
float x14_releaseDur = 0.f;
bool x18_24_hasSustain : 1;
bool x18_25_autoRelease : 1;
bool x18_24_hasSustain : 1 = false;
bool x18_25_autoRelease : 1 = false;
constexpr SAdsrData() noexcept : x18_24_hasSustain(false), x18_25_autoRelease(false) {}
constexpr SAdsrData() noexcept = default;
constexpr SAdsrData(float attackGain, float autoReleaseDur, float attackDur, float decayDur, float sustainGain,
float releaseDur, bool hasSustain, bool autoRelease) noexcept
: x0_attackGain(attackGain)