From fba4833dc20cb85040e0fc58e1ba7cf381ab9515 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Wed, 4 Dec 2019 08:56:34 -0800 Subject: [PATCH] Remove one suppression --- .../Core/Portable/Collections/SmallConcurrentSetOfInts.cs | 7 ++++--- src/Dependencies/PooledObjects/ObjectPool`1.cs | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Compilers/Core/Portable/Collections/SmallConcurrentSetOfInts.cs b/src/Compilers/Core/Portable/Collections/SmallConcurrentSetOfInts.cs index 47c458606c2..428f584992a 100644 --- a/src/Compilers/Core/Portable/Collections/SmallConcurrentSetOfInts.cs +++ b/src/Compilers/Core/Portable/Collections/SmallConcurrentSetOfInts.cs @@ -53,18 +53,19 @@ public bool Contains(int i) private static bool Contains(SmallConcurrentSetOfInts set, int i) { + SmallConcurrentSetOfInts? current = set; do { // PERF: Not testing for unoccupied slots since it adds complexity. The extra comparisons // would slow down this inner loop such that any benefit of an 'early out' would be lost. - if (set._v1 == i || set._v2 == i || set._v3 == i || set._v4 == i) + if (current._v1 == i || current._v2 == i || current._v3 == i || current._v4 == i) { return true; } - set = set._next!; + current = current._next; } - while (set != null); + while (current != null); return false; } diff --git a/src/Dependencies/PooledObjects/ObjectPool`1.cs b/src/Dependencies/PooledObjects/ObjectPool`1.cs index 8005c5e2c19..5ca974338c0 100644 --- a/src/Dependencies/PooledObjects/ObjectPool`1.cs +++ b/src/Dependencies/PooledObjects/ObjectPool`1.cs @@ -24,7 +24,6 @@ namespace Microsoft.CodeAnalysis.PooledObjects internal delegate TReturn Func(TArg arg); #endif - /// /// Generic implementation of object pooling pattern with predefined pool size limit. The main /// purpose is that limited number of frequently used objects can be kept in the pool for -- GitLab