From b14a741ffecdcbe6688ad4197d16cf6ae75f4d15 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Wed, 8 Feb 2023 23:40:15 +1000 Subject: [PATCH] Merge `Where` calls fixes 0d02d5c49 and e7884f679 --- src/BizHawk.Client.EmuHawk/tools/ToolBox.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolBox.cs b/src/BizHawk.Client.EmuHawk/tools/ToolBox.cs index 1e63e83e20..ebdb145202 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolBox.cs @@ -18,13 +18,12 @@ namespace BizHawk.Client.EmuHawk => Properties.Resources.ToolBoxIcon; private static readonly Lazy> ToolTypes = new(() => EmuHawk.ReflectionCache.Types - .Where(static t => typeof(IToolForm).IsAssignableFrom(t) && typeof(Form).IsAssignableFrom(t)) -#if DEBUG - .Where(static t => t.Namespace is not "BizHawk.Client.EmuHawk.ForDebugging") + .Where(static t => typeof(IToolForm).IsAssignableFrom(t) && typeof(Form).IsAssignableFrom(t) +#if DEBUG // these tools are simply not compiled in Release config + && t.Namespace is not "BizHawk.Client.EmuHawk.ForDebugging" #endif - .Where(VersionInfo.DeveloperBuild - ? static t => true - : static t => !t.GetCustomAttributes(false).OfType().Any(static a => !a.Released)) + && (VersionInfo.DeveloperBuild + || !t.GetCustomAttributes(false).OfType().Any(static a => !a.Released))) .Except(new[] { typeof(ToolBox), typeof(ToolFormBase) }).ToList()); [RequiredService]