From 6ca5143b15421173c51bd9f5b83c6877272c2d9f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 10 Sep 2019 19:00:47 -0400 Subject: [PATCH] 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. --- Runtime/Input/CRumbleVoice.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/Input/CRumbleVoice.hpp b/Runtime/Input/CRumbleVoice.hpp index 5b3042756..146249073 100644 --- a/Runtime/Input/CRumbleVoice.hpp +++ b/Runtime/Input/CRumbleVoice.hpp @@ -37,9 +37,9 @@ struct SAdsrData { u8 dummy = 0; }; - SAdsrData() = default; - SAdsrData(float attackGain, float autoReleaseDur, float attackDur, float decayDur, float sustainGain, - float releaseDur, bool hasSustain, bool autoRelease) + 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) , x4_autoReleaseDur(autoReleaseDur) , x8_attackDur(attackDur)