From a49d26f80015acb9f99f0f4381b22cba4377add1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 5 Apr 2020 05:12:23 -0400 Subject: [PATCH] CParticleElectric: Return std::nullopt in GetBounds() Same behavior, but avoids zeroing out the internal buffer in some implementations of std::optional. --- Runtime/Particle/CParticleElectric.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Runtime/Particle/CParticleElectric.cpp b/Runtime/Particle/CParticleElectric.cpp index 00c6ef3d2..355b8aaaa 100644 --- a/Runtime/Particle/CParticleElectric.cpp +++ b/Runtime/Particle/CParticleElectric.cpp @@ -695,10 +695,11 @@ bool CParticleElectric::IsSystemDeletable() const { } std::optional CParticleElectric::GetBounds() const { - if (GetParticleCount() <= 0) - return {}; - else - return x160_systemBounds; + if (GetParticleCount() <= 0) { + return std::nullopt; + } + + return x160_systemBounds; } u32 CParticleElectric::GetParticleCount() const {