From 12e09475f091794201180fa7ccc27a246bb28a23 Mon Sep 17 00:00:00 2001 From: wrenge Date: Wed, 13 Nov 2024 17:15:32 +0300 Subject: [PATCH] Replace predicate find with simple find --- src/DotRecast.Core/Collections/RcSortedQueue.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DotRecast.Core/Collections/RcSortedQueue.cs b/src/DotRecast.Core/Collections/RcSortedQueue.cs index 0c06aad..cb09d63 100644 --- a/src/DotRecast.Core/Collections/RcSortedQueue.cs +++ b/src/DotRecast.Core/Collections/RcSortedQueue.cs @@ -88,7 +88,7 @@ namespace DotRecast.Core.Collections return false; //int idx = _items.BinarySearch(item, _comparer); // don't use this! Because reference types can be reused externally. - int idx = _items.FindLastIndex(x => item.Equals(x)); + int idx = _items.LastIndexOf(item); if (0 > idx) return false;