CLink: Collapse null checking

This commit is contained in:
Lioncache
2025-12-14 02:17:37 -05:00
parent 3f7eb16b54
commit 661a36f84a

View File

@@ -111,9 +111,7 @@ public:
uint32 SenderIndex() const
{
CScriptObject *pSender = mpArea->InstanceByID(mSenderID);
if (pSender)
if (const CScriptObject* pSender = mpArea->InstanceByID(mSenderID))
{
for (uint32 iLink = 0; iLink < pSender->NumLinks(ELinkType::Outgoing); iLink++)
{
@@ -127,9 +125,7 @@ public:
uint32 ReceiverIndex() const
{
CScriptObject *pReceiver = mpArea->InstanceByID(mReceiverID);
if (pReceiver)
if (const CScriptObject* pReceiver = mpArea->InstanceByID(mReceiverID))
{
for (uint32 iLink = 0; iLink < pReceiver->NumLinks(ELinkType::Incoming); iLink++)
{