2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-06 10:33:27 +00:00

CFire: Return std::nullopt in GetTouchBounds()

Avoids unnecessarily zeroing out the entire internal buffer in
std::optional in some implementations (libstdc++/libc++).
This commit is contained in:
Lioncash 2020-04-12 08:46:20 -04:00
parent 9e168d3497
commit aa8f17d847

View File

@ -35,10 +35,11 @@ public:
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
void Think(float, CStateManager&) override;
std::optional<zeus::CAABox> GetTouchBounds() const override {
if (GetActive())
if (GetActive()) {
return x128_;
}
return {};
return std::nullopt;
}
void Touch(CActor&, CStateManager&) override;