Enable SA1314 and fix noncompliance
"Type parameter names should begin with T"
This commit is contained in:
parent
a8bd9733f4
commit
dcae34ce47
|
@ -441,9 +441,6 @@
|
||||||
|
|
||||||
<!-- Parameter names should begin with lower-case letter -->
|
<!-- Parameter names should begin with lower-case letter -->
|
||||||
<Rule Id="SA1313" Action="Hidden" />
|
<Rule Id="SA1313" Action="Hidden" />
|
||||||
|
|
||||||
<!-- Type parameter names should begin with T -->
|
|
||||||
<Rule Id="SA1314" Action="Hidden" />
|
|
||||||
</Rules>
|
</Rules>
|
||||||
|
|
||||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.MaintainabilityRules">
|
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.MaintainabilityRules">
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// ReSharper disable once UnusedMember.Global
|
// ReSharper disable once UnusedMember.Global
|
||||||
public class SaturnSchema : IVirtualPadSchema
|
public class SaturnSchema : IVirtualPadSchema
|
||||||
{
|
{
|
||||||
private static V GetOrDefault<K, V>(IDictionary<K, V> dict, K key)
|
private static TValue GetOrDefault<TKey, TValue>(IDictionary<TKey, TValue> dict, TKey key)
|
||||||
{
|
{
|
||||||
dict.TryGetValue(key, out var ret);
|
dict.TryGetValue(key, out var ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Components.x86
|
||||||
public override string ToString() => $"{Addr:X6}: {RawBytes,-12} {Mnemonic,-8} {Args}";
|
public override string ToString() => $"{Addr:X6}: {RawBytes,-12} {Mnemonic,-8} {Args}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class x86<CpuType> where CpuType : struct, x86CpuType
|
public partial class x86<TCpu> where TCpu : struct, x86CpuType
|
||||||
{
|
{
|
||||||
private ushort ReadWord(int addr)
|
private ushort ReadWord(int addr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace BizHawk.Emulation.Cores.Components.x86
|
namespace BizHawk.Emulation.Cores.Components.x86
|
||||||
{
|
{
|
||||||
public partial class x86<CpuType> where CpuType : struct, x86CpuType
|
public partial class x86<TCpu> where TCpu : struct, x86CpuType
|
||||||
{
|
{
|
||||||
public void Execute(int cycles)
|
public void Execute(int cycles)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace BizHawk.Emulation.Cores.Components.x86
|
namespace BizHawk.Emulation.Cores.Components.x86
|
||||||
{
|
{
|
||||||
public partial class x86<CpuType> where CpuType : struct, x86CpuType
|
public partial class x86<TCpu> where TCpu : struct, x86CpuType
|
||||||
{
|
{
|
||||||
// TODO test if static on these is a performance boost
|
// TODO test if static on these is a performance boost
|
||||||
// it would be appropriate if so because closed types have their own static variables
|
// it would be appropriate if so because closed types have their own static variables
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
private void InitTiming()
|
private void InitTiming()
|
||||||
{
|
{
|
||||||
if (typeof(CpuType) == typeof(Intel8086))
|
if (typeof(TCpu) == typeof(Intel8086))
|
||||||
{
|
{
|
||||||
timing_mov_ri8 = 4;
|
timing_mov_ri8 = 4;
|
||||||
timing_mov_ri16 = 4;
|
timing_mov_ri16 = 4;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Components.x86
|
||||||
public interface x86CpuType { }
|
public interface x86CpuType { }
|
||||||
public struct Intel8086 : x86CpuType { }
|
public struct Intel8086 : x86CpuType { }
|
||||||
|
|
||||||
public sealed partial class x86<CpuType> where CpuType : struct, x86CpuType
|
public sealed partial class x86<TCpu> where TCpu : struct, x86CpuType
|
||||||
{
|
{
|
||||||
// Machine State
|
// Machine State
|
||||||
public Register16 RegAX;
|
public Register16 RegAX;
|
||||||
|
|
Loading…
Reference in New Issue