Remove unused parameters

This commit is contained in:
Paul Pacheco 2019-06-19 08:08:07 -05:00
parent 2b108f3f12
commit 4608b6f9a2
4 changed files with 8 additions and 8 deletions

View File

@ -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);
}
}
}

View File

@ -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)
{

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}