Adjust naming conventions and general refactoring in HLE Project (#490)

* Rename enum fields

* Naming conventions

* Remove unneeded ".this"

* Remove unneeded semicolons

* Remove unused Usings

* Don't use var

* Remove unneeded enum underlying types

* Explicitly label class visibility

* Remove unneeded @ prefixes

* Remove unneeded commas

* Remove unneeded if expressions

* Method doesn't use unsafe code

* Remove unneeded casts

* Initialized objects don't need an empty constructor

* Remove settings from DotSettings

* Revert "Explicitly label class visibility"

This reverts commit ad5eb5787c.

* Small changes

* Revert external enum renaming

* Changes from feedback

* Remove unneeded property setters
This commit is contained in:
Alex Barney 2018-12-04 14:23:37 -06:00 committed by gdkchan
parent c86aacde76
commit 85dbb9559a
299 changed files with 12268 additions and 12276 deletions

View file

@ -6,30 +6,30 @@ namespace Ryujinx.HLE.Utilities
{
public struct UInt128
{
public long High { get; private set; }
public long Low { get; private set; }
public long High { get; }
public long Low { get; }
public UInt128(long Low, long High)
public UInt128(long low, long high)
{
this.Low = Low;
this.High = High;
Low = low;
High = high;
}
public UInt128(string UInt128Hex)
public UInt128(string hex)
{
if (UInt128Hex == null || UInt128Hex.Length != 32 || !UInt128Hex.All("0123456789abcdefABCDEF".Contains))
if (hex == null || hex.Length != 32 || !hex.All("0123456789abcdefABCDEF".Contains))
{
throw new ArgumentException("Invalid Hex value!", nameof(UInt128Hex));
throw new ArgumentException("Invalid Hex value!", nameof(hex));
}
Low = Convert.ToInt64(UInt128Hex.Substring(16), 16);
High = Convert.ToInt64(UInt128Hex.Substring(0, 16), 16);
Low = Convert.ToInt64(hex.Substring(16), 16);
High = Convert.ToInt64(hex.Substring(0, 16), 16);
}
public void Write(BinaryWriter BinaryWriter)
public void Write(BinaryWriter binaryWriter)
{
BinaryWriter.Write(Low);
BinaryWriter.Write(High);
binaryWriter.Write(Low);
binaryWriter.Write(High);
}
public override string ToString()