Turn Version into struct, use bytes

This commit is contained in:
jvyden 2022-05-15 16:23:55 -04:00
commit ed8b5881fe
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
2 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ public class TicketReader : BinaryReader
public TicketReader([NotNull] Stream input) : base(input)
{}
public Version ReadTicketVersion() => new(this.ReadByte() >> 4, this.ReadByte());
public Version ReadTicketVersion() => new((byte)(this.ReadByte() >> 4), this.ReadByte());
public SectionHeader ReadSectionHeader()
{

View file

@ -1,11 +1,11 @@
namespace LBPUnion.ProjectLighthouse.Types;
public class Version
public struct Version
{
public int Major { get; set; }
public int Minor { get; set; }
public byte Major { get; set; }
public byte Minor { get; set; }
public Version(int major, int minor)
public Version(byte major, byte minor)
{
this.Major = major;
this.Minor = minor;