diff --git a/BizHawk.Client.Common/ControllerBinding.cs b/BizHawk.Client.Common/ControllerBinding.cs
index f75d65b1a6..e2c9c8f978 100644
--- a/BizHawk.Client.Common/ControllerBinding.cs
+++ b/BizHawk.Client.Common/ControllerBinding.cs
@@ -65,10 +65,7 @@ namespace BizHawk.Client.Common
.ToList();
// Searches bindings for the controller and returns true if this binding is mapped somewhere in this controller
- public bool HasBinding(string button)
- {
- return _bindings.SelectMany(kvp => kvp.Value).Any(boundButton => boundButton == button);
- }
+ public bool HasBinding(string button) => _bindings.SelectMany(kvp => kvp.Value).Contains(button);
public void NormalizeFloats(IController controller)
{
diff --git a/BizHawk.Client.Common/tools/Watch/Watch.cs b/BizHawk.Client.Common/tools/Watch/Watch.cs
index 4b4aa4ca5f..646fb16d36 100644
--- a/BizHawk.Client.Common/tools/Watch/Watch.cs
+++ b/BizHawk.Client.Common/tools/Watch/Watch.cs
@@ -484,10 +484,7 @@ namespace BizHawk.Client.Common
/// used for the current
///
/// you want to check
- public bool IsDiplayTypeAvailable(DisplayType type)
- {
- return AvailableTypes().Any(d => d == type);
- }
+ public bool IsDiplayTypeAvailable(DisplayType type) => AvailableTypes().Contains(type);
///
/// Transforms the current instance into a string
diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs
index 1013274026..e2def5df86 100644
--- a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs
+++ b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs
@@ -667,17 +667,17 @@ namespace BizHawk.Client.EmuHawk
switch (size)
{
case WatchSize.Byte:
- isTypeCompatible = ByteWatch.ValidTypes.Any(t => t == _settings.Type);
+ isTypeCompatible = ByteWatch.ValidTypes.Contains(_settings.Type);
SizeDropdown.SelectedIndex = 0;
break;
case WatchSize.Word:
- isTypeCompatible = WordWatch.ValidTypes.Any(t => t == _settings.Type);
+ isTypeCompatible = WordWatch.ValidTypes.Contains(_settings.Type);
SizeDropdown.SelectedIndex = 1;
break;
case WatchSize.DWord:
- isTypeCompatible = DWordWatch.ValidTypes.Any(t => t == _settings.Type);
+ isTypeCompatible = DWordWatch.ValidTypes.Contains(_settings.Type);
SizeDropdown.SelectedIndex = 2;
break;
}
diff --git a/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs b/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs
index e5016cfd99..50ef62bbbc 100644
--- a/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs
+++ b/BizHawk.Client.EmuHawk/tools/Watch/WatchValueBox.cs
@@ -41,15 +41,15 @@ namespace BizHawk.Client.EmuHawk
switch (value)
{
case WatchSize.Byte:
- isTypeCompatible = ByteWatch.ValidTypes.Any(t => t == _type);
+ isTypeCompatible = ByteWatch.ValidTypes.Contains(_type);
break;
case WatchSize.Word:
- isTypeCompatible = WordWatch.ValidTypes.Any(t => t == _type);
+ isTypeCompatible = WordWatch.ValidTypes.Contains(_type);
break;
case WatchSize.DWord:
- isTypeCompatible = DWordWatch.ValidTypes.Any(t => t == _type);
+ isTypeCompatible = DWordWatch.ValidTypes.Contains(_type);
break;
}
diff --git a/BizHawk.Common/Extensions/NumberExtensions.cs b/BizHawk.Common/Extensions/NumberExtensions.cs
index 38438659a5..98a415a9a1 100644
--- a/BizHawk.Common/Extensions/NumberExtensions.cs
+++ b/BizHawk.Common/Extensions/NumberExtensions.cs
@@ -50,10 +50,7 @@ namespace BizHawk.Common.NumberExtensions
return (b & (1 << index)) != 0;
}
- public static bool In(this int i, params int[] options)
- {
- return options.Any(j => i == j);
- }
+ public static bool In(this int i, params int[] options) => options.Contains(i);
public static byte BinToBCD(this byte v)
{
diff --git a/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs b/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs
index 0df3232a4a..aaea809947 100644
--- a/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs
+++ b/BizHawk.Emulation.Common/Base Implementations/MemoryCallbackSystem.cs
@@ -108,20 +108,11 @@ namespace BizHawk.Emulation.Common
public bool HasExecutes => _hasExecutes;
- public bool HasReadsForScope(string scope)
- {
- return _reads.Where(e => e.Scope == scope).Any();
- }
+ public bool HasReadsForScope(string scope) => _reads.Any(e => e.Scope == scope);
- public bool HasWritesForScope(string scope)
- {
- return _writes.Where(e => e.Scope == scope).Any();
- }
+ public bool HasWritesForScope(string scope) => _writes.Any(e => e.Scope == scope);
- public bool HasExecutesForScope(string scope)
- {
- return _execs.Where(e => e.Scope == scope).Any();
- }
+ public bool HasExecutesForScope(string scope) => _execs.Any(e => e.Scope == scope);
private bool UpdateHasVariables()
{
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs
index 74e1b06d09..7f1ea454d0 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Input/StandardKeyboard.cs
@@ -92,7 +92,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
foreach (var key in _machine.CPC.AmstradCPCControllerDefinition.BoolButtons)
{
- if (!KeyboardMatrix.Any(s => s == key))
+ if (!KeyboardMatrix.Contains(key))
nonMatrix.Add(key);
}
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
index 77cb18d38c..39f45972df 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Hardware/Input/StandardKeyboard.cs
@@ -69,7 +69,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
foreach (var key in _machine.Spectrum.ZXSpectrumControllerDefinition.BoolButtons)
{
- if (!KeyboardMatrix.Any(s => s == key))
+ if (!KeyboardMatrix.Contains(key))
nonMatrix.Add(key);
}