From 2701f060ee03b2e80e97243d003f7a66fb7f15a2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Mar 2020 00:28:42 -0400 Subject: [PATCH] CRumbleVoice: Resize vectors within constructor initializer list Same behavior, but constructs in place with the size, rather than constructing and then resizing. x20_handleIds cannot be done the same way unfortunately, as reserved_vector doesn't have a constructor accepting a size argument like std::vector does. --- Runtime/Input/CRumbleVoice.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Runtime/Input/CRumbleVoice.cpp b/Runtime/Input/CRumbleVoice.cpp index 49bf8a0f5..f59b33362 100644 --- a/Runtime/Input/CRumbleVoice.cpp +++ b/Runtime/Input/CRumbleVoice.cpp @@ -2,9 +2,7 @@ namespace urde { -CRumbleVoice::CRumbleVoice() { - x0_datas.resize(4); - x10_deltas.resize(4, SAdsrDelta::Stopped()); +CRumbleVoice::CRumbleVoice() : x0_datas(4), x10_deltas(4, SAdsrDelta::Stopped()) { x20_handleIds.resize(4); }