mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Weaver PropertySiteProcessor: remove redundant AssemblyDefinition parameter. Weaver passes assembly.MainModule anyway.
This commit is contained in:
parent
4258220b26
commit
5cc908a18d
@ -6,7 +6,7 @@ namespace Mirror.Weaver
|
||||
{
|
||||
public static class PropertySiteProcessor
|
||||
{
|
||||
public static void ProcessSitesModule(AssemblyDefinition assembly, ModuleDefinition moduleDef)
|
||||
public static void ProcessSitesModule(ModuleDefinition moduleDef)
|
||||
{
|
||||
DateTime startTime = DateTime.Now;
|
||||
|
||||
@ -21,16 +21,16 @@ public static void ProcessSitesModule(AssemblyDefinition assembly, ModuleDefinit
|
||||
if (Weaver.WeaveLists.generateContainerClass != null)
|
||||
{
|
||||
moduleDef.Types.Add(Weaver.WeaveLists.generateContainerClass);
|
||||
assembly.MainModule.ImportReference(Weaver.WeaveLists.generateContainerClass);
|
||||
moduleDef.ImportReference(Weaver.WeaveLists.generateContainerClass);
|
||||
|
||||
foreach (MethodDefinition f in Weaver.WeaveLists.generatedReadFunctions)
|
||||
{
|
||||
assembly.MainModule.ImportReference(f);
|
||||
moduleDef.ImportReference(f);
|
||||
}
|
||||
|
||||
foreach (MethodDefinition f in Weaver.WeaveLists.generatedWriteFunctions)
|
||||
{
|
||||
assembly.MainModule.ImportReference(f);
|
||||
moduleDef.ImportReference(f);
|
||||
}
|
||||
}
|
||||
Console.WriteLine(" ProcessSitesModule " + moduleDef.Name + " elapsed time:" + (DateTime.Now - startTime));
|
||||
|
@ -331,7 +331,7 @@ static bool Weave(string assName, AssemblyDefinition unityAssembly, AssemblyDefi
|
||||
// this must be done for ALL code, not just NetworkBehaviours
|
||||
try
|
||||
{
|
||||
PropertySiteProcessor.ProcessSitesModule(CurrentAssembly, moduleDefinition);
|
||||
PropertySiteProcessor.ProcessSitesModule(moduleDefinition);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user