Skip to content

Commit 845475b

Browse files
author
Alex Peck
committed
fixes
1 parent 8990263 commit 845475b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

BitFaster.Caching.Benchmarks/Lfu/CmSketchFlat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ private int IndexOf(int item, int i)
199199
return ((int)hash) & tableMask;
200200
}
201201

202-
private int Spread(int x)
202+
private static int Spread(int x)
203203
{
204204
uint y = (uint)x;
205205
y = ((y >> 16) ^ y) * 0x45d9f3b;

BitFaster.Caching/Atomic/AtomicEx.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Collections.Generic;
44
using System.Collections.ObjectModel;
55
using System.Linq;
6-
using System.Text;
76

87
namespace BitFaster.Caching.Atomic
98
{
@@ -21,6 +20,7 @@ internal static int EnumerateCount(IEnumerator enumerator)
2120

2221
internal static ICollection<K> FilterKeys<K, V>(IEnumerable<KeyValuePair<K, V>> kvps, Func<V, bool> filter)
2322
{
23+
#pragma warning disable CA1851
2424
// Here we will double enumerate the kvps list. Alternative is to lazy init the size which will keep resizing
2525
// the List, and spam allocs if the list is long.
2626
List<K> keys = new List<K>(kvps.Count());
@@ -34,6 +34,7 @@ internal static ICollection<K> FilterKeys<K, V>(IEnumerable<KeyValuePair<K, V>>
3434
}
3535

3636
return new ReadOnlyCollection<K>(keys);
37+
#pragma warning restore CA1851
3738
}
3839
}
3940
}

0 commit comments

Comments
 (0)