Convert `GenericDebugger.DisasmOp` to a struct

This commit is contained in:
YoshiRulz 2023-04-23 19:08:19 +10:00
parent 70bd081a93
commit 9cbd238997
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 9 additions and 4 deletions

View File

@ -15,8 +15,14 @@ namespace BizHawk.Client.EmuHawk
private int _pcRegisterSize = 4;
private uint _currentDisassemblerAddress;
private class DisasmOp
private readonly struct DisasmOp
{
public readonly uint Address;
public readonly string Mnemonic;
public readonly int Size;
public DisasmOp(uint address, int size, string mnemonic)
{
Address = address;
@ -24,9 +30,8 @@ namespace BizHawk.Client.EmuHawk
Mnemonic = mnemonic;
}
public uint Address { get; }
public int Size { get; }
public string Mnemonic { get; }
public override string ToString()
=> Mnemonic;
}
private long BusMaxValue => MemoryDomains.SystemBus.Size;