diff options
| author | ACGNnsj <ootopoo@vip.qq.com> | 2023-03-28 20:59:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-28 14:59:43 +0200 |
| commit | 460f96967de6f5cb729ed57baaa4dad2178c8cb6 (patch) | |
| tree | 9cb4ef2daa0e712d3b449572ab018e9fdab74179 /Ryujinx.Horizon/Sdk/Sf/CommandSerialization.cs | |
| parent | 7ca779a26d76a3ad1edd94ba6c1cfd7466d73314 (diff) | |
Slight Code Refactoring (#4373)
* Simplify return statements by using ternary expressions
* Remove a redundant type conversion
* Reduce nesting by inverting "if" statements
* Try to improve code readability by using LINQ and inverting "if" statements
* Try to improve code readability by using LINQ, using ternary expressions, and inverting "if" statements
* Add line breaks to long LINQ
* Add line breaks to long LINQ
Diffstat (limited to 'Ryujinx.Horizon/Sdk/Sf/CommandSerialization.cs')
| -rw-r--r-- | Ryujinx.Horizon/Sdk/Sf/CommandSerialization.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Ryujinx.Horizon/Sdk/Sf/CommandSerialization.cs b/Ryujinx.Horizon/Sdk/Sf/CommandSerialization.cs index feb2d666..4205d3c1 100644 --- a/Ryujinx.Horizon/Sdk/Sf/CommandSerialization.cs +++ b/Ryujinx.Horizon/Sdk/Sf/CommandSerialization.cs @@ -53,7 +53,7 @@ namespace Ryujinx.Horizon.Sdk.Sf public static void SerializeArg<T>(Span<byte> outRawData, int offset, T value) where T : unmanaged { - MemoryMarshal.Cast<byte, T>(outRawData.Slice(offset, Unsafe.SizeOf<T>()))[0] = (T)value; + MemoryMarshal.Cast<byte, T>(outRawData.Slice(offset, Unsafe.SizeOf<T>()))[0] = value; } public static void SerializeCopyHandle(HipcMessageData response, int index, int value) |
