From 51dcd3db468dd8951b2c52e9095ab8cdabc6bbff Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 3 Mar 2020 19:09:44 -0600 Subject: [PATCH] remove now redundant casts --- .../tools/RamSearchEngine/RamSearchEngine.cs | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs b/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs index c4e8dec7ea..4a17dc672f 100644 --- a/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs +++ b/BizHawk.Client.Common/tools/RamSearchEngine/RamSearchEngine.cs @@ -620,41 +620,34 @@ namespace BizHawk.Client.Common.RamSearchEngine case ComparisonOperator.Equal: return watchList .Cast() - .Where(w => w.ChangeCount == compareValue) - .Cast(); + .Where(w => w.ChangeCount == compareValue); case ComparisonOperator.NotEqual: return watchList .Cast() - .Where(w => w.ChangeCount != compareValue) - .Cast(); + .Where(w => w.ChangeCount != compareValue); case ComparisonOperator.GreaterThan: return watchList .Cast() - .Where(w => w.ChangeCount > compareValue) - .Cast(); + .Where(w => w.ChangeCount > compareValue); case ComparisonOperator.GreaterThanEqual: return watchList .Cast() - .Where(w => w.ChangeCount >= compareValue) - .Cast(); + .Where(w => w.ChangeCount >= compareValue); case ComparisonOperator.LessThan: return watchList .Cast() - .Where(w => w.ChangeCount < compareValue) - .Cast(); + .Where(w => w.ChangeCount < compareValue); case ComparisonOperator.LessThanEqual: return watchList .Cast() - .Where(w => w.ChangeCount <= compareValue) - .Cast(); + .Where(w => w.ChangeCount <= compareValue); case ComparisonOperator.DifferentBy: if (DifferentBy.HasValue) { return watchList .Cast() .Where(w => w.ChangeCount + DifferentBy.Value == compareValue - || w.ChangeCount - DifferentBy.Value == compareValue) - .Cast(); + || w.ChangeCount - DifferentBy.Value == compareValue); } throw new InvalidOperationException();