From 7606bc302c9c5c02abec71c6ff4f3e10b3432a90 Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sat, 5 Aug 2023 00:23:47 +0200 Subject: [PATCH] Small cleanup --- Recyclable.Collections/RecyclableLongList.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Recyclable.Collections/RecyclableLongList.cs b/Recyclable.Collections/RecyclableLongList.cs index 0087e71..e6b7c8b 100644 --- a/Recyclable.Collections/RecyclableLongList.cs +++ b/Recyclable.Collections/RecyclableLongList.cs @@ -10,10 +10,8 @@ namespace Recyclable.Collections { public partial class RecyclableLongList : IList, IReadOnlyList, IDisposable { -#pragma warning disable CA1825 private static readonly T[][] _emptyMemoryBlocksArray = new T[0][]; private static readonly T[] _emptyBlockArray = new T[0]; -#pragma warning restore CA1825 private static readonly bool _defaultIsNull = default(T) == null; private static readonly bool NeedsClearing = !typeof(T).IsValueType; @@ -183,9 +181,7 @@ namespace Recyclable.Collections } [MethodImpl(MethodImplOptions.AggressiveOptimization)] -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize)); @@ -203,9 +199,7 @@ namespace Recyclable.Collections } } -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(in T[] source, int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize)); @@ -225,9 +219,7 @@ namespace Recyclable.Collections AddRange(source); } -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(ReadOnlySpan source, int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize)); @@ -247,9 +239,7 @@ namespace Recyclable.Collections AddRange(source); } -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(RecyclableList source, int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize)); @@ -269,9 +259,7 @@ namespace Recyclable.Collections AddRange(source); } -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(RecyclableLongList source, int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize)); @@ -291,9 +279,7 @@ namespace Recyclable.Collections AddRange(source); } -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(List source, int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize)); @@ -313,9 +299,7 @@ namespace Recyclable.Collections AddRange(source); } -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(IList source, int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize)); @@ -335,9 +319,7 @@ namespace Recyclable.Collections AddRange(source); } -#pragma warning disable CS8618 // The reported properties / fields are set by SetupBlockArrayPooling public RecyclableLongList(IEnumerable source, int minBlockSize = RecyclableDefaults.BlockSize, long? expectedItemsCount = default) -#pragma warning restore CS8618 { minBlockSize = checked((int)BitOperations.RoundUpToPowerOf2((uint)minBlockSize));