mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Remove unused parameters
This commit is contained in:
parent
2b108f3f12
commit
4608b6f9a2
@ -144,8 +144,8 @@ public static bool ProcessMethodsValidateCommand(MethodDefinition md, CustomAttr
|
||||
}
|
||||
|
||||
// validate
|
||||
return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md, "Command") &&
|
||||
NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca, "Command");
|
||||
return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md) &&
|
||||
NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ public static void AddInvokeParameters(ICollection<ParameterDefinition> collecti
|
||||
collection.Add(new ParameterDefinition("reader", ParameterAttributes.None, Weaver.CurrentAssembly.MainModule.ImportReference(Weaver.NetworkReaderType)));
|
||||
}
|
||||
|
||||
public static bool ProcessMethodsValidateFunction(MethodReference md, string actionType)
|
||||
public static bool ProcessMethodsValidateFunction(MethodReference md)
|
||||
{
|
||||
if (md.ReturnType.FullName == Weaver.IEnumeratorType.FullName)
|
||||
{
|
||||
@ -662,7 +662,7 @@ public static bool ProcessMethodsValidateFunction(MethodReference md, string act
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool ProcessMethodsValidateParameters(MethodReference md, CustomAttribute ca, string actionType)
|
||||
public static bool ProcessMethodsValidateParameters(MethodReference md, CustomAttribute ca)
|
||||
{
|
||||
for (int i = 0; i < md.Parameters.Count; ++i)
|
||||
{
|
||||
|
@ -101,8 +101,8 @@ public static bool ProcessMethodsValidateRpc(MethodDefinition md, CustomAttribut
|
||||
}
|
||||
|
||||
// validate
|
||||
return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md, "Rpc") &&
|
||||
NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca, "Rpc");
|
||||
return NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md) &&
|
||||
NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,13 +137,13 @@ public static bool ProcessMethodsValidateTargetRpc(MethodDefinition md, CustomAt
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md, "Target Rpc"))
|
||||
if (!NetworkBehaviourProcessor.ProcessMethodsValidateFunction(md))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// validate
|
||||
return NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca, "Target Rpc");
|
||||
return NetworkBehaviourProcessor.ProcessMethodsValidateParameters(md, ca);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user