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/CommandHandler.cs | |
parent | 7ca779a26d76a3ad1edd94ba6c1cfd7466d73314 (diff) |
Slight Code Refactoring (#4373)1.1.687
* 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/CommandHandler.cs')
-rw-r--r-- | Ryujinx.Horizon/Sdk/Sf/CommandHandler.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Ryujinx.Horizon/Sdk/Sf/CommandHandler.cs b/Ryujinx.Horizon/Sdk/Sf/CommandHandler.cs index fe079d47..081ce3be 100644 --- a/Ryujinx.Horizon/Sdk/Sf/CommandHandler.cs +++ b/Ryujinx.Horizon/Sdk/Sf/CommandHandler.cs @@ -40,12 +40,7 @@ namespace Ryujinx.Horizon.Sdk.Sf var runtimeMetadata = context.Processor.GetRuntimeMetadata(); Result result = context.Processor.PrepareForProcess(ref context, runtimeMetadata); - if (result.IsFailure) - { - return result; - } - - return _invoke(ref context, _processor, runtimeMetadata, inRawData, ref outHeader); + return result.IsFailure ? result : _invoke(ref context, _processor, runtimeMetadata, inRawData, ref outHeader); } public static void GetCmifOutHeaderPointer(ref Span<CmifOutHeader> outHeader, ref Span<byte> outRawData) |