From 6da036a9339c7dd4254f3dd004e2f624a42410cd Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 1 Mar 2026 10:40:17 -0800 Subject: [PATCH] Use consistent Extension call pattern in legoentity and legoworld Use 'using namespace Extensions' and value_or() instead of verbose fully-qualified names and has_value()/value(), matching the pattern used in legotextureinfo.cpp. --- LEGO1/lego/legoomni/src/entity/legoentity.cpp | 5 +++-- LEGO1/lego/legoomni/src/entity/legoworld.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/LEGO1/lego/legoomni/src/entity/legoentity.cpp b/LEGO1/lego/legoomni/src/entity/legoentity.cpp index b49be644..f1f06034 100644 --- a/LEGO1/lego/legoomni/src/entity/legoentity.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoentity.cpp @@ -21,6 +21,8 @@ #include +using namespace Extensions; + DECOMP_SIZE_ASSERT(LegoEntity, 0x68) // FUNCTION: LEGO1 0x100105f0 @@ -484,8 +486,7 @@ MxLong LegoEntity::Notify(MxParam& p_param) InvokeAction(m_actionType, MxAtomId(m_siFile, e_lowerCase2), m_targetEntityId, this); } else { - auto handled = Extensions::Extension::Call(Extensions::HandleEntityNotify, this); - if (handled.has_value() && handled.value()) { + if (Extension::Call(HandleEntityNotify, this).value_or(FALSE)) { return 1; } diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 4c47f694..4c756466 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -755,7 +755,7 @@ void LegoWorld::Enable(MxBool p_enable) SetIsWorldActive(TRUE); #endif - Extensions::Extension::Call(Extensions::HandleWorldEnable, this, TRUE); + Extension::Call(HandleWorldEnable, this, TRUE); } else if (!p_enable && m_disabledObjects.size() == 0) { MxPresenter* presenter; @@ -819,7 +819,7 @@ void LegoWorld::Enable(MxBool p_enable) GetViewManager()->RemoveAll(NULL); - Extensions::Extension::Call(Extensions::HandleWorldEnable, this, FALSE); + Extension::Call(HandleWorldEnable, this, FALSE); } }