2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-20 07:53:28 +00:00

CParticleElectric: Return std::nullopt in GetBounds()

Same behavior, but avoids zeroing out the internal buffer in some
implementations of std::optional.
This commit is contained in:
Lioncash 2020-04-05 05:12:23 -04:00
parent 852dd5c6bf
commit a49d26f800

View File

@ -695,10 +695,11 @@ bool CParticleElectric::IsSystemDeletable() const {
}
std::optional<zeus::CAABox> CParticleElectric::GetBounds() const {
if (GetParticleCount() <= 0)
return {};
else
return x160_systemBounds;
if (GetParticleCount() <= 0) {
return std::nullopt;
}
return x160_systemBounds;
}
u32 CParticleElectric::GetParticleCount() const {