mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-31 17:28:39 +00:00
Turn Version into struct, use bytes
This commit is contained in:
parent
b6081ec65f
commit
ed8b5881fe
2 changed files with 5 additions and 5 deletions
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue