diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2019-07-01 21:39:22 -0500 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2019-07-02 04:39:22 +0200 |
| commit | b2b736abc2569ab5d8199da666aef8d8394844a0 (patch) | |
| tree | 88bcc2ae4fb0d4161c95df2cd7edb12388de922a /Ryujinx.HLE/Loaders | |
| parent | 10c74182babaf8cf6bedaeffd64c3109df4ea816 (diff) | |
Misc cleanup (#708)
* Fix typos
* Remove unneeded using statements
* Enforce var style more
* Remove redundant qualifiers
* Fix some indentation
* Disable naming warnings on files with external enum names
* Fix build
* Mass find & replace for comments with no spacing
* Standardize todo capitalization and for/if spacing
Diffstat (limited to 'Ryujinx.HLE/Loaders')
| -rw-r--r-- | Ryujinx.HLE/Loaders/Compression/Lz4.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Executables/NxStaticObject.cs | 6 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Npdm/ACI0.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Npdm/ACID.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Npdm/Npdm.cs | 6 | ||||
| -rw-r--r-- | Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs | 6 |
6 files changed, 14 insertions, 14 deletions
diff --git a/Ryujinx.HLE/Loaders/Compression/Lz4.cs b/Ryujinx.HLE/Loaders/Compression/Lz4.cs index e405b107..2001a8dc 100644 --- a/Ryujinx.HLE/Loaders/Compression/Lz4.cs +++ b/Ryujinx.HLE/Loaders/Compression/Lz4.cs @@ -34,7 +34,7 @@ namespace Ryujinx.HLE.Loaders.Compression int encCount = (token >> 0) & 0xf; int litCount = (token >> 4) & 0xf; - //Copy literal chunck + // Copy literal chunk litCount = GetLength(litCount); Buffer.BlockCopy(cmp, cmpPos, dec, decPos, litCount); @@ -47,7 +47,7 @@ namespace Ryujinx.HLE.Loaders.Compression break; } - //Copy compressed chunck + // Copy compressed chunk int back = cmp[cmpPos++] << 0 | cmp[cmpPos++] << 8; diff --git a/Ryujinx.HLE/Loaders/Executables/NxStaticObject.cs b/Ryujinx.HLE/Loaders/Executables/NxStaticObject.cs index c35a8f1a..03c3b39a 100644 --- a/Ryujinx.HLE/Loaders/Executables/NxStaticObject.cs +++ b/Ryujinx.HLE/Loaders/Executables/NxStaticObject.cs @@ -75,7 +75,7 @@ namespace Ryujinx.HLE.Loaders.Executables DataOffset = dataMemOffset; BssSize = bssSize; - //Text segment + // Text segment input.Seek(textOffset, SeekOrigin.Begin); Text = reader.ReadBytes(textSize); @@ -85,7 +85,7 @@ namespace Ryujinx.HLE.Loaders.Executables Text = Lz4.Decompress(Text, textDecSize); } - //Read-only data segment + // Read-only data segment input.Seek(roOffset, SeekOrigin.Begin); Ro = reader.ReadBytes(roSize); @@ -95,7 +95,7 @@ namespace Ryujinx.HLE.Loaders.Executables Ro = Lz4.Decompress(Ro, roDecSize); } - //Data segment + // Data segment input.Seek(dataOffset, SeekOrigin.Begin); Data = reader.ReadBytes(dataSize); diff --git a/Ryujinx.HLE/Loaders/Npdm/ACI0.cs b/Ryujinx.HLE/Loaders/Npdm/ACI0.cs index 55f3319d..af426bcf 100644 --- a/Ryujinx.HLE/Loaders/Npdm/ACI0.cs +++ b/Ryujinx.HLE/Loaders/Npdm/ACI0.cs @@ -30,7 +30,7 @@ namespace Ryujinx.HLE.Loaders.Npdm TitleId = reader.ReadInt64(); - //Reserved. + // Reserved. stream.Seek(8, SeekOrigin.Current); int fsAccessHeaderOffset = reader.ReadInt32(); diff --git a/Ryujinx.HLE/Loaders/Npdm/ACID.cs b/Ryujinx.HLE/Loaders/Npdm/ACID.cs index 57c5cf3e..4a181b29 100644 --- a/Ryujinx.HLE/Loaders/Npdm/ACID.cs +++ b/Ryujinx.HLE/Loaders/Npdm/ACID.cs @@ -33,12 +33,12 @@ namespace Ryujinx.HLE.Loaders.Npdm throw new InvalidNpdmException("ACID Stream doesn't contain ACID section!"); } - //Size field used with the above signature (?). + // Size field used with the above signature (?). Unknown1 = reader.ReadInt32(); reader.ReadInt32(); - //Bit0 must be 1 on retail, on devunit 0 is also allowed. Bit1 is unknown. + // Bit0 must be 1 on retail, on devunit 0 is also allowed. Bit1 is unknown. Flags = reader.ReadInt32(); TitleIdRangeMin = reader.ReadInt64(); diff --git a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs index cef2673e..36449e40 100644 --- a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs +++ b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs @@ -4,9 +4,9 @@ using System.Text; namespace Ryujinx.HLE.Loaders.Npdm { - //https://github.com/SciresM/hactool/blob/master/npdm.c - //https://github.com/SciresM/hactool/blob/master/npdm.h - //http://switchbrew.org/index.php?title=NPDM + // https://github.com/SciresM/hactool/blob/master/npdm.c + // https://github.com/SciresM/hactool/blob/master/npdm.h + // http://switchbrew.org/index.php?title=NPDM class Npdm { private const int MetaMagic = 'M' << 0 | 'E' << 8 | 'T' << 16 | 'A' << 24; diff --git a/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs b/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs index def780a2..03f62ff7 100644 --- a/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs +++ b/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs @@ -15,11 +15,11 @@ namespace Ryujinx.HLE.Loaders.Npdm BinaryReader reader = new BinaryReader(stream); - int byteReaded = 0; + int bytesRead = 0; Dictionary<string, bool> services = new Dictionary<string, bool>(); - while (byteReaded != size) + while (bytesRead != size) { byte controlByte = reader.ReadByte(); @@ -33,7 +33,7 @@ namespace Ryujinx.HLE.Loaders.Npdm services[Encoding.ASCII.GetString(reader.ReadBytes(length))] = registerAllowed; - byteReaded += length + 1; + bytesRead += length + 1; } Services = new ReadOnlyDictionary<string, bool>(services); |
