using System; using System.Runtime.CompilerServices; using HG; using JetBrains.Annotations; [Obsolete("HGArrayUtilities is deprecated. Use HG.ArrayUtils instead.")] public static class HGArrayUtilities { [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ArrayInsertNoResize(T[] array, int arraySize, int position, ref T value) { ArrayUtils.ArrayInsertNoResize(array, arraySize, position, in value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ArrayInsert(ref T[] array, ref int arraySize, int position, ref T value) { ArrayUtils.ArrayInsert(ref array, ref arraySize, position, in value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ArrayInsert(ref T[] array, int position, ref T value) { ArrayUtils.ArrayInsert(ref array, position, in value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ArrayAppend(ref T[] array, ref int arraySize, ref T value) { ArrayUtils.ArrayAppend(ref array, ref arraySize, in value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ArrayAppend(ref T[] array, ref T value) { ArrayUtils.ArrayAppend(ref array, in value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ArrayRemoveAt(ref T[] array, ref int arraySize, int position, int count = 1) { ArrayUtils.ArrayRemoveAt(array, ref arraySize, position, count); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ArrayRemoveAtAndResize(ref T[] array, int position, int count = 1) { ArrayUtils.ArrayRemoveAtAndResize(ref array, position, count); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T GetSafe([NotNull] T[] array, int index) { return ArrayUtils.GetSafe(array, index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T GetSafe([NotNull] T[] array, int index, T defaultValue) { return ArrayUtils.GetSafe(array, index, in defaultValue); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetAll(T[] array, in T value) { ArrayUtils.SetAll(array, in value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EnsureCapacity(ref T[] array, int capacity) { ArrayUtils.EnsureCapacity(ref array, capacity); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Swap(T[] array, int a, int b) { ArrayUtils.Swap(array, a, b); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Clear(T[] array, ref int count) { ArrayUtils.Clear(array, ref count); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool SequenceEquals(T[] a, T[] b) where T : IEquatable { return ArrayUtils.SequenceEquals(a, b); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T[] Clone(T[] src) { return ArrayUtils.Clone(src); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsInBounds(T[] array, int index) { return ArrayUtils.IsInBounds(array, index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsInBounds(T[] array, uint index) { return ArrayUtils.IsInBounds(array, index); } }