From b2b736abc2569ab5d8199da666aef8d8394844a0 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Mon, 1 Jul 2019 21:39:22 -0500 Subject: 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 --- Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcSystem.cs | 6 +++--- Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs | 18 +++++++++--------- Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall') diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcSystem.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcSystem.cs index efc10512..5f971131 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcSystem.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcSystem.cs @@ -161,7 +161,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall process = thread.Owner; } - //TODO: KDebugEvent. + // TODO: KDebugEvent. } pid = process?.Pid ?? 0; @@ -549,10 +549,10 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall switch (id) { - //Memory region capacity. + // Memory region capacity. case 0: value = (long)region.Size; break; - //Memory region free space. + // Memory region free space. case 1: { ulong freePagesCount = region.GetFreePages(); diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs index dd98e8a0..23934649 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs @@ -151,10 +151,10 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall } } - //For functions returning output values, the first registers - //are used to hold pointers where the value will be stored, - //so they can't be used to pass argument and we must - //skip them. + // For functions returning output values, the first registers + // are used to hold pointers where the value will be stored, + // so they can't be used to pass argument and we must + // skip them. int byRefArgsCount = 0; for (int index = 0; index < methodArgs.Length; index++) @@ -165,7 +165,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall } } - //Print all the arguments for debugging purposes. + // Print all the arguments for debugging purposes. int inputArgsCount = methodArgs.Length - byRefArgsCount; generator.Emit(OpCodes.Ldc_I4_S, inputArgsCount); @@ -200,7 +200,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall generator.Emit(OpCodes.Call, printArgsMethod); - //Call the SVC function handler. + // Call the SVC function handler. generator.Emit(OpCodes.Ldarg_0); List locals = new List(); @@ -239,7 +239,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall Type retType = methodInfo.ReturnType; - //Print result code. + // Print result code. if (retType == typeof(KernelResult)) { MethodInfo printResultMethod = typeof(SvcTable).GetMethod(nameof(PrintResult), staticNonPublic); @@ -249,7 +249,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall generator.Emit(OpCodes.Call, printResultMethod); } - //Save return value into register X0 (when the method has a return value). + // Save return value into register X0 (when the method has a return value). if (retType != typeof(void)) { CheckIfTypeIsSupported(retType, svcName); @@ -275,7 +275,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall generator.Emit(OpCodes.Stfld, GetStateFieldX(outRegIndex++)); } - //Zero out the remaining unused registers. + // Zero out the remaining unused registers. while (outRegIndex < SvcFuncMaxArguments) { generator.Emit(OpCodes.Ldarg_1); diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs index fa0b3a6c..e1f018c1 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs @@ -175,7 +175,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall public KernelResult SetThreadPriority(int handle, int priority) { - //TODO: NPDM check. + // TODO: NPDM check. KThread thread = _process.HandleTable.GetKThread(handle); -- cgit v1.2.3