From 6684d8336c1812a396b827fa6a3c430e6b719dcc Mon Sep 17 00:00:00 2001 From: Simon Rodriguez Date: Mon, 28 Nov 2022 21:43:09 +0100 Subject: [PATCH] clean whitespace --- Scripts/NodeDataCache.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Scripts/NodeDataCache.cs b/Scripts/NodeDataCache.cs index f381845..c559fe9 100644 --- a/Scripts/NodeDataCache.cs +++ b/Scripts/NodeDataCache.cs @@ -36,8 +36,8 @@ namespace XNode { Dictionary staticPorts; if (!portDataCache.TryGetValue(nodeType, out staticPorts)) { - staticPorts = new Dictionary(); - } + staticPorts = new Dictionary(); + } // Cleanup port dict - Remove nonexisting static ports - update static port types // AND update dynamic ports (albeit only those in lists) too, in order to enforce proper serialisation. @@ -69,6 +69,7 @@ namespace XNode { dynamicListPorts.Add(port); } } + // Add missing ports foreach (NodePort staticPort in staticPorts.Values) { if (!ports.ContainsKey(staticPort.fieldName)) { @@ -206,8 +207,8 @@ namespace XNode { if (inputAttrib != null && outputAttrib != null) Debug.LogError("Field " + fieldInfo[i].Name + " of type " + nodeType.FullName + " cannot be both input and output."); else { if (!portDataCache.ContainsKey(nodeType)) portDataCache.Add(nodeType, new Dictionary()); - NodePort port = new NodePort(fieldInfo[i]); - portDataCache[nodeType].Add(port.fieldName, port); + NodePort port = new NodePort(fieldInfo[i]); + portDataCache[nodeType].Add(port.fieldName, port); } if (formerlySerializedAsAttribute != null) {