aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2018-12-04 14:23:37 -0600
committergdkchan <gab.dark.100@gmail.com>2018-12-04 18:23:37 -0200
commit85dbb9559ad317a657dafd24da27fec4b3f5250f (patch)
treeecd92931bc2146e549484d9a3af308469089ad4e /Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs
parentc86aacde76b5f8e503e2b412385c8491ecc86b3b (diff)
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 ad5eb5787cc5b27a4631cd46ef5f551c4ae95e51. * Small changes * Revert external enum renaming * Changes from feedback * Remove unneeded property setters
Diffstat (limited to 'Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs')
-rw-r--r--Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs b/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs
index 707be603..d349f26b 100644
--- a/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs
+++ b/Ryujinx.HLE/Loaders/Npdm/ServiceAccessControl.cs
@@ -7,36 +7,36 @@ namespace Ryujinx.HLE.Loaders.Npdm
{
class ServiceAccessControl
{
- public IReadOnlyDictionary<string, bool> Services { get; private set; }
+ public IReadOnlyDictionary<string, bool> Services { get; }
- public ServiceAccessControl(Stream Stream, int Offset, int Size)
+ public ServiceAccessControl(Stream stream, int offset, int size)
{
- Stream.Seek(Offset, SeekOrigin.Begin);
+ stream.Seek(offset, SeekOrigin.Begin);
- BinaryReader Reader = new BinaryReader(Stream);
+ BinaryReader reader = new BinaryReader(stream);
- int ByteReaded = 0;
+ int byteReaded = 0;
- Dictionary<string, bool> Services = new Dictionary<string, bool>();
+ Dictionary<string, bool> services = new Dictionary<string, bool>();
- while (ByteReaded != Size)
+ while (byteReaded != size)
{
- byte ControlByte = Reader.ReadByte();
+ byte controlByte = reader.ReadByte();
- if (ControlByte == 0)
+ if (controlByte == 0)
{
break;
}
- int Length = (ControlByte & 0x07) + 1;
- bool RegisterAllowed = (ControlByte & 0x80) != 0;
+ int length = (controlByte & 0x07) + 1;
+ bool registerAllowed = (controlByte & 0x80) != 0;
- Services.Add(Encoding.ASCII.GetString(Reader.ReadBytes(Length), 0, Length), RegisterAllowed);
+ services.Add(Encoding.ASCII.GetString(reader.ReadBytes(length), 0, length), registerAllowed);
- ByteReaded += Length + 1;
+ byteReaded += length + 1;
}
- this.Services = new ReadOnlyDictionary<string, bool>(Services);
+ Services = new ReadOnlyDictionary<string, bool>(services);
}
}
}