mirror of https://github.com/AxioDL/metaforce.git
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:
parent
9e168d3497
commit
aa8f17d847
|
@ -35,10 +35,11 @@ public:
|
||||||
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
std::optional<zeus::CAABox> GetTouchBounds() const override {
|
std::optional<zeus::CAABox> GetTouchBounds() const override {
|
||||||
if (GetActive())
|
if (GetActive()) {
|
||||||
return x128_;
|
return x128_;
|
||||||
|
}
|
||||||
|
|
||||||
return {};
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Touch(CActor&, CStateManager&) override;
|
void Touch(CActor&, CStateManager&) override;
|
||||||
|
|
Loading…
Reference in New Issue