mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
changes to LinkedModCollection nullability
This commit is contained in:
parent
e0000c9ef9
commit
75182d094b
3 changed files with 9 additions and 15 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||
|
||||
namespace Penumbra.Collections;
|
||||
|
|
@ -6,11 +6,7 @@ namespace Penumbra.Collections;
|
|||
public class LinkedModCollection
|
||||
{
|
||||
private IntPtr? _associatedGameObject;
|
||||
public IntPtr AssociatedGameObject
|
||||
{
|
||||
get => _associatedGameObject ?? IntPtr.Zero;
|
||||
set => _associatedGameObject = value;
|
||||
}
|
||||
public IntPtr AssociatedGameObject = IntPtr.Zero;
|
||||
public ModCollection ModCollection;
|
||||
|
||||
public LinkedModCollection(ModCollection modCollection)
|
||||
|
|
@ -18,15 +14,13 @@ public class LinkedModCollection
|
|||
ModCollection = modCollection;
|
||||
}
|
||||
|
||||
public LinkedModCollection(IntPtr? gameObject, ModCollection collection)
|
||||
public LinkedModCollection(IntPtr gameObject, ModCollection collection)
|
||||
{
|
||||
AssociatedGameObject = gameObject ?? IntPtr.Zero;
|
||||
AssociatedGameObject = gameObject;
|
||||
ModCollection = collection;
|
||||
}
|
||||
|
||||
public unsafe LinkedModCollection(GameObject* gameObject, ModCollection collection)
|
||||
public unsafe LinkedModCollection(GameObject* gameObject, ModCollection collection) : this((IntPtr)gameObject, collection)
|
||||
{
|
||||
AssociatedGameObject = ( IntPtr )gameObject;
|
||||
ModCollection = collection;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue