From 0d9d358f4358b091d16e50cd47752bde1e3a0502 Mon Sep 17 00:00:00 2001 From: Next Turn <45985406+NextTurn@users.noreply.github.com> Date: Sat, 24 Aug 2019 21:32:02 +0800 Subject: [PATCH] Remove unnecessary !s for [DoesNotReturn] (dotnet/coreclr#26350) Commit migrated from https://github.com/dotnet/coreclr/commit/850529a98b32be66bdec5a54a2ef684207d918f2 --- src/libraries/System.Private.CoreLib/src/System/Array.cs | 2 +- .../src/System/Collections/Generic/List.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Array.cs b/src/libraries/System.Private.CoreLib/src/System/Array.cs index d6daceb..0ceeec3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Array.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Array.cs @@ -770,7 +770,7 @@ namespace System int endIndex = startIndex + count; for (int i = startIndex; i < endIndex; i++) { - if (match!(array[i])) + if (match(array[i])) return i; } return -1; diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs index 4e3ea63..d72f6f4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs @@ -430,7 +430,7 @@ namespace System.Collections.Generic for (int i = 0; i < _size; i++) { - if (match!(_items[i])) + if (match(_items[i])) { return _items[i]; } @@ -482,7 +482,7 @@ namespace System.Collections.Generic int endIndex = startIndex + count; for (int i = startIndex; i < endIndex; i++) { - if (match!(_items[i])) return i; + if (match(_items[i])) return i; } return -1; } @@ -497,7 +497,7 @@ namespace System.Collections.Generic for (int i = _size - 1; i >= 0; i--) { - if (match!(_items[i])) + if (match(_items[i])) { return _items[i]; } @@ -567,7 +567,7 @@ namespace System.Collections.Generic { break; } - action!(_items[i]); + action(_items[i]); } if (version != _version) @@ -875,7 +875,7 @@ namespace System.Collections.Generic while (current < _size) { // Find the first item which needs to be kept. - while (current < _size && match!(_items[current])) current++; + while (current < _size && match(_items[current])) current++; if (current < _size) { @@ -1073,7 +1073,7 @@ namespace System.Collections.Generic for (int i = 0; i < _size; i++) { - if (!match!(_items[i])) + if (!match(_items[i])) { return false; } -- 2.7.4