From f12f90366bb78577f165955f018760c28db6f93e Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Fri, 14 Feb 2025 18:48:10 +0100 Subject: [PATCH] Revert "Add more `GetValueOrDefault` overloads" This reverts commit 34d71e90bcd7ace6736363553083b925b5bf888f. This was hardly used and caused trouble in .net 8 with the way it was defined. --- src/BizHawk.Common/Extensions/CollectionExtensions.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/BizHawk.Common/Extensions/CollectionExtensions.cs b/src/BizHawk.Common/Extensions/CollectionExtensions.cs index 7f49167b62..d58397ba81 100644 --- a/src/BizHawk.Common/Extensions/CollectionExtensions.cs +++ b/src/BizHawk.Common/Extensions/CollectionExtensions.cs @@ -165,10 +165,6 @@ namespace BizHawk.Common.CollectionExtensions /// If the key is not present, returns default(TValue). /// backported from .NET Core 2.0 /// - public static TValue? GetValueOrDefault(IDictionary dictionary, TKey key) - => dictionary.TryGetValue(key, out var found) ? found : default; - - /// public static TValue? GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key) => dictionary.TryGetValue(key, out var found) ? found : default; @@ -177,10 +173,6 @@ namespace BizHawk.Common.CollectionExtensions /// If the key is not present, returns . /// backported from .NET Core 2.0 /// - public static TValue? GetValueOrDefault(IDictionary dictionary, TKey key, TValue defaultValue) - => dictionary.TryGetValue(key, out var found) ? found : defaultValue; - - /// public static TValue? GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key, TValue defaultValue) => dictionary.TryGetValue(key, out var found) ? found : defaultValue; #endif