mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-19 02:24:37 +08:00
update array utils
This commit is contained in:
parent
ca232ac33b
commit
506e08e720
@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
#if ENABLE_IL2CPP
|
||||||
|
using Unity.IL2CPP.CompilerServices;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace DCFApixels.DragonECS.Internal
|
namespace DCFApixels.DragonECS.Internal
|
||||||
{
|
{
|
||||||
@ -11,6 +13,10 @@ namespace DCFApixels.DragonECS.Internal
|
|||||||
// int Compare(T a, T b);
|
// int Compare(T a, T b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_IL2CPP
|
||||||
|
[Il2CppSetOption (Option.NullChecks, false)]
|
||||||
|
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
|
||||||
|
#endif
|
||||||
internal static class ArraySortHalperX<T>
|
internal static class ArraySortHalperX<T>
|
||||||
{
|
{
|
||||||
private const int IntrosortSizeThreshold = 16;
|
private const int IntrosortSizeThreshold = 16;
|
||||||
@ -109,6 +115,10 @@ namespace DCFApixels.DragonECS.Internal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_IL2CPP
|
||||||
|
[Il2CppSetOption (Option.NullChecks, false)]
|
||||||
|
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
|
||||||
|
#endif
|
||||||
private class ComparisonHach : IComparer<T>
|
private class ComparisonHach : IComparer<T>
|
||||||
{
|
{
|
||||||
public static readonly ComparisonHach Instance = new ComparisonHach();
|
public static readonly ComparisonHach Instance = new ComparisonHach();
|
||||||
@ -151,6 +161,10 @@ namespace DCFApixels.DragonECS.Internal
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_IL2CPP
|
||||||
|
[Il2CppSetOption (Option.NullChecks, false)]
|
||||||
|
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
|
||||||
|
#endif
|
||||||
internal static unsafe class UnsafeArraySortHalperX<T> where T : unmanaged
|
internal static unsafe class UnsafeArraySortHalperX<T> where T : unmanaged
|
||||||
{
|
{
|
||||||
private const int IntrosortSizeThreshold = 16;
|
private const int IntrosortSizeThreshold = 16;
|
||||||
|
Loading…
Reference in New Issue
Block a user