mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-22 01:45:55 +08:00
fix mem alloc api
This commit is contained in:
parent
015c6be9f0
commit
cc834c4a92
@ -86,7 +86,7 @@ namespace DCFApixels.DragonECS.Core.Internal
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ReallocAndInit
|
#region ReallocAndInit
|
||||||
public static HMem<T> ReallocAndInit<T>(void* target, int oldCount, int newCount) where T : unmanaged
|
public static HMem<T> ReallocAndInit<T>(T* target, int oldCount, int newCount) where T : unmanaged
|
||||||
{
|
{
|
||||||
return ReallocAndInit<T>(Handler.FromDataPtr(target), oldCount, newCount);
|
return ReallocAndInit<T>(Handler.FromDataPtr(target), oldCount, newCount);
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ namespace DCFApixels.DragonECS.Core.Internal
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Realloc
|
#region Realloc
|
||||||
public static HMem<T> Realloc<T>(void* target, int newCount) where T : unmanaged
|
public static HMem<T> Realloc<T>(T* target, int newCount) where T : unmanaged
|
||||||
{
|
{
|
||||||
return Realloc<T>(Handler.FromDataPtr(target), Marshal.SizeOf<T>() * newCount);
|
return Realloc<T>(Handler.FromDataPtr(target), Marshal.SizeOf<T>() * newCount);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user