Make NotificationManager::Send take a const reference to notification (#836)

* Make NotificationManager::Send take a const reference to notification

* Fix virtual func
This commit is contained in:
Christian Semmler
2024-04-22 08:11:38 -04:00
committed by GitHub
parent 0e0d6890ad
commit f1688be263
22 changed files with 50 additions and 180 deletions

View File

@@ -334,16 +334,9 @@ MxResult MxDiskStreamController::VTable0x24(MxDSAction* p_action)
AUTOLOCK(m_criticalSection);
if (m_unk0x54.Find(p_action, FALSE) == NULL) {
if (VTable0x30(p_action) == SUCCESS) {
#ifdef COMPAT_MODE
{
MxEndActionNotificationParam param(c_notificationEndAction, NULL, p_action, TRUE);
MxOmni::GetInstance()->NotifyCurrentEntity(&param);
}
#else
MxOmni::GetInstance()->NotifyCurrentEntity(
&MxEndActionNotificationParam(c_notificationEndAction, NULL, p_action, TRUE)
MxEndActionNotificationParam(c_notificationEndAction, NULL, p_action, TRUE)
);
#endif
}
}

View File

@@ -81,14 +81,7 @@ MxLong MxStreamer::Close(const char* p_name)
delete c;
}
else {
#ifdef COMPAT_MODE
{
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
NotificationManager()->Send(this, &notification);
}
#else
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
#endif
NotificationManager()->Send(this, MxStreamerNotification(c_notificationStreamer, NULL, c));
}
return SUCCESS;
@@ -99,7 +92,7 @@ MxLong MxStreamer::Close(const char* p_name)
}
// FUNCTION: LEGO1 0x100b9700
MxNotificationParam* MxStreamerNotification::Clone()
MxNotificationParam* MxStreamerNotification::Clone() const
{
return new MxStreamerNotification(m_type, m_sender, m_controller);
}
@@ -204,14 +197,7 @@ MxLong MxStreamer::Notify(MxParam& p_param)
delete c;
}
else {
#ifdef COMPAT_MODE
{
MxStreamerNotification notification(c_notificationStreamer, NULL, c);
NotificationManager()->Send(this, &notification);
}
#else
NotificationManager()->Send(this, &MxStreamerNotification(c_notificationStreamer, NULL, c));
#endif
NotificationManager()->Send(this, MxStreamerNotification(c_notificationStreamer, NULL, c));
}
}