From 476af2382977969412623320e2d393a65c915ec0 Mon Sep 17 00:00:00 2001 From: vis2k Date: Wed, 2 Jan 2019 20:01:42 +0100 Subject: [PATCH] CommandProcessor.ProcessMethodsValidateCommand simplified --- Mirror/Weaver/Processors/CommandProcessor.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Mirror/Weaver/Processors/CommandProcessor.cs b/Mirror/Weaver/Processors/CommandProcessor.cs index d95f9ad59..4e19631df 100644 --- a/Mirror/Weaver/Processors/CommandProcessor.cs +++ b/Mirror/Weaver/Processors/CommandProcessor.cs @@ -156,16 +156,9 @@ public static bool ProcessMethodsValidateCommand(TypeDefinition td, MethodDefini return false; } - if (!NetworkBehaviourProcessor.ProcessMethodsValidateFunction(td, md, "Command")) - { - return false; - } - - if (!NetworkBehaviourProcessor.ProcessMethodsValidateParameters(td, md, ca, "Command")) - { - return false; - } - return true; + // validate + return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(td, md, "Command") && + NetworkBehaviourProcessor.ProcessMethodsValidateParameters(td, md, ca, "Command"); } } } \ No newline at end of file