aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2023-06-28 01:27:48 +0200
committerGitHub <noreply@github.com>2023-06-27 23:27:48 +0000
commite055217292e034e46ebadd2e839b301b996d7064 (patch)
tree14510fcda8e0de97ca57442ad89bc07f19ad8573
parentfbaf62c2309f2987fa73a2022167ee3e81e31ea9 (diff)
[Ryujinx.Horizon.Kernel.Generators] Address dotnet-format issues (#5376)1.1.928
* Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * Run dotnet format pass * Remove left-over files and adjust namespaces * Fix alignment
-rw-r--r--src/Ryujinx.Horizon.Kernel.Generators/CodeGenerator.cs2
-rw-r--r--src/Ryujinx.Horizon.Kernel.Generators/SyscallGenerator.cs (renamed from src/Ryujinx.Horizon.Kernel.Generators/Kernel/SyscallGenerator.cs)12
-rw-r--r--src/Ryujinx.Horizon.Kernel.Generators/SyscallSyntaxReceiver.cs (renamed from src/Ryujinx.Horizon.Kernel.Generators/Kernel/SyscallSyntaxReceiver.cs)2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/Ryujinx.Horizon.Kernel.Generators/CodeGenerator.cs b/src/Ryujinx.Horizon.Kernel.Generators/CodeGenerator.cs
index 80a33c66..121b6dd5 100644
--- a/src/Ryujinx.Horizon.Kernel.Generators/CodeGenerator.cs
+++ b/src/Ryujinx.Horizon.Kernel.Generators/CodeGenerator.cs
@@ -1,6 +1,6 @@
using System.Text;
-namespace Ryujinx.Horizon.Generators
+namespace Ryujinx.Horizon.Kernel.Generators
{
class CodeGenerator
{
diff --git a/src/Ryujinx.Horizon.Kernel.Generators/Kernel/SyscallGenerator.cs b/src/Ryujinx.Horizon.Kernel.Generators/SyscallGenerator.cs
index 51da2187..75f966f3 100644
--- a/src/Ryujinx.Horizon.Kernel.Generators/Kernel/SyscallGenerator.cs
+++ b/src/Ryujinx.Horizon.Kernel.Generators/SyscallGenerator.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
-namespace Ryujinx.Horizon.Generators.Kernel
+namespace Ryujinx.Horizon.Kernel.Generators
{
[Generator]
class SyscallGenerator : ISourceGenerator
@@ -157,10 +157,10 @@ namespace Ryujinx.Horizon.Generators.Kernel
GetCanonicalTypeName(context.Compilation, attribute) == TypeSvcAttribute)))
{
syscalls.AddRange(from attributeArg in attribute.ArgumentList.Arguments
- where attributeArg.Expression.Kind() == SyntaxKind.NumericLiteralExpression
- select (LiteralExpressionSyntax)attributeArg.Expression
- into numericLiteral
- select new SyscallIdAndName((int)numericLiteral.Token.Value, method.Identifier.Text));
+ where attributeArg.Expression.Kind() == SyntaxKind.NumericLiteralExpression
+ select (LiteralExpressionSyntax)attributeArg.Expression
+ into numericLiteral
+ select new SyscallIdAndName((int)numericLiteral.Token.Value, method.Identifier.Text));
}
}
@@ -369,7 +369,7 @@ namespace Ryujinx.Horizon.Generators.Kernel
{
generator.AppendLine($"context.SetX({returnRegisterIndex++}, (ulong){ResultVariableName});");
}
-
+
result = GetFormattedLogValue(ResultVariableName, canonicalReturnTypeName);
}
else
diff --git a/src/Ryujinx.Horizon.Kernel.Generators/Kernel/SyscallSyntaxReceiver.cs b/src/Ryujinx.Horizon.Kernel.Generators/SyscallSyntaxReceiver.cs
index e480a859..f586ee68 100644
--- a/src/Ryujinx.Horizon.Kernel.Generators/Kernel/SyscallSyntaxReceiver.cs
+++ b/src/Ryujinx.Horizon.Kernel.Generators/SyscallSyntaxReceiver.cs
@@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Collections.Generic;
using System.Linq;
-namespace Ryujinx.Horizon.Generators.Kernel
+namespace Ryujinx.Horizon.Kernel.Generators
{
class SyscallSyntaxReceiver : ISyntaxReceiver
{