Convert RegisterValue to a readonly struct

This commit is contained in:
YoshiRulz 2021-08-01 19:02:38 +10:00
parent 92dfdaec0f
commit c26b99b547
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 4 additions and 3 deletions

View File

@ -47,10 +47,11 @@ namespace BizHawk.Emulation.Common
long TotalExecutedCycles { get; } // TODO: this should probably be a long, but most cores were using int, oh well
}
public class RegisterValue
public readonly struct RegisterValue
{
public ulong Value { get; }
public byte BitSize { get; }
public readonly byte BitSize;
public readonly ulong Value;
/// <exception cref="ArgumentOutOfRangeException"><paramref name="bitSize"/> not in 1..64</exception>
public RegisterValue(ulong val, byte bitSize)