mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Remove redundant null checking, and unused module log.
There's no reasonable way the args passed in will be null. There's tons of null checking that square does before passing the pointers to these functions. If they are null, then the game has likely already crashed.
This commit is contained in:
parent
371b8a9dcc
commit
e914f33990
1 changed files with 0 additions and 11 deletions
|
|
@ -138,9 +138,6 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
|
||||
private nint OnAddonSetup(AtkUnitBase* addon)
|
||||
{
|
||||
if (addon is null)
|
||||
return this.onAddonSetupHook.Original(addon);
|
||||
|
||||
try
|
||||
{
|
||||
this.InvokeListeners(AddonEvent.PreSetup, new IAddonLifecycle.AddonArgs { Addon = (nint)addon });
|
||||
|
|
@ -166,12 +163,6 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
|
||||
private void OnAddonFinalize(AtkUnitManager* unitManager, AtkUnitBase** atkUnitBase)
|
||||
{
|
||||
if (atkUnitBase is null || atkUnitBase[0] is null)
|
||||
{
|
||||
this.onAddonFinalizeHook.Original(unitManager, atkUnitBase);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
this.InvokeListeners(AddonEvent.PreFinalize, new IAddonLifecycle.AddonArgs { Addon = (nint)atkUnitBase[0] });
|
||||
|
|
@ -288,8 +279,6 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
|||
#pragma warning restore SA1015
|
||||
internal class AddonLifecyclePluginScoped : IDisposable, IServiceType, IAddonLifecycle
|
||||
{
|
||||
private static readonly ModuleLog Log = new("AddonLifecycle:PluginScoped");
|
||||
|
||||
[ServiceManager.ServiceDependency]
|
||||
private readonly AddonLifecycle addonLifecycleService = Service<AddonLifecycle>.Get();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue