mirror of https://github.com/AxioDL/metaforce.git
CRumbleVoice: Make SAdsrData constructors constexpr
Technically all file-scope instances have runtime-static constructors otherwise. This allows the compiler to completely elide them from a language point of view.
This commit is contained in:
parent
1b1cc42139
commit
6ca5143b15
|
@ -37,9 +37,9 @@ struct SAdsrData {
|
||||||
u8 dummy = 0;
|
u8 dummy = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
SAdsrData() = default;
|
constexpr SAdsrData() noexcept = default;
|
||||||
SAdsrData(float attackGain, float autoReleaseDur, float attackDur, float decayDur, float sustainGain,
|
constexpr SAdsrData(float attackGain, float autoReleaseDur, float attackDur, float decayDur, float sustainGain,
|
||||||
float releaseDur, bool hasSustain, bool autoRelease)
|
float releaseDur, bool hasSustain, bool autoRelease) noexcept
|
||||||
: x0_attackGain(attackGain)
|
: x0_attackGain(attackGain)
|
||||||
, x4_autoReleaseDur(autoReleaseDur)
|
, x4_autoReleaseDur(autoReleaseDur)
|
||||||
, x8_attackDur(attackDur)
|
, x8_attackDur(attackDur)
|
||||||
|
|
Loading…
Reference in New Issue