From b7cef180d41db3f90f1ab00a4d94fcefff31f1d4 Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Sun, 12 Apr 2020 11:04:22 -0500 Subject: [PATCH] Rename local variable for clarity --- Assets/Mirror/Editor/Weaver/Weaver.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Assets/Mirror/Editor/Weaver/Weaver.cs b/Assets/Mirror/Editor/Weaver/Weaver.cs index 74cf63736..7da412c9f 100644 --- a/Assets/Mirror/Editor/Weaver/Weaver.cs +++ b/Assets/Mirror/Editor/Weaver/Weaver.cs @@ -381,12 +381,12 @@ static bool WeaveNetworkBehavior(TypeDefinition td) } } - bool didWork = false; + bool modified = false; foreach (TypeDefinition behaviour in behaviourClasses) { - didWork |= ProcessNetworkBehaviourType(behaviour); + modified |= ProcessNetworkBehaviourType(behaviour); } - return didWork; + return modified; } static bool WeaveMessage(TypeDefinition td) @@ -394,21 +394,21 @@ static bool WeaveMessage(TypeDefinition td) if (!td.IsClass) return false; - bool didWork = false; + bool modified = false; if (td.ImplementsInterface(IMessageBaseType)) { MessageClassProcessor.Process(td); - didWork = true; + modified = true; } // check for embedded types foreach (TypeDefinition embedded in td.NestedTypes) { - didWork |= WeaveMessage(embedded); + modified |= WeaveMessage(embedded); } - return didWork; + return modified; } static bool WeaveSyncObject(TypeDefinition td) @@ -416,7 +416,7 @@ static bool WeaveSyncObject(TypeDefinition td) if (!td.IsClass) return false; - bool didWork = false; + bool modified = false; // are ANY parent classes SyncListStruct TypeReference parent = td.BaseType; @@ -425,19 +425,19 @@ static bool WeaveSyncObject(TypeDefinition td) if (parent.FullName.StartsWith(SyncListType.FullName, StringComparison.Ordinal)) { SyncListProcessor.Process(td); - didWork = true; + modified = true; break; } if (parent.FullName.StartsWith(SyncSetType.FullName, StringComparison.Ordinal)) { SyncListProcessor.Process(td); - didWork = true; + modified = true; break; } if (parent.FullName.StartsWith(SyncDictionaryType.FullName, StringComparison.Ordinal)) { SyncDictionaryProcessor.Process(td); - didWork = true; + modified = true; break; } try @@ -455,10 +455,10 @@ static bool WeaveSyncObject(TypeDefinition td) // check for embedded types foreach (TypeDefinition embedded in td.NestedTypes) { - didWork |= WeaveSyncObject(embedded); + modified |= WeaveSyncObject(embedded); } - return didWork; + return modified; } static bool Weave(string assName, IEnumerable dependencies, string unityEngineDLLPath, string mirrorNetDLLPath, string outputDir)