From f16731395714f3adf29e0ccd2a6b68a877c4c43c Mon Sep 17 00:00:00 2001 From: Simon Rodriguez Date: Wed, 2 Nov 2022 09:12:06 +0100 Subject: [PATCH] use string substring instead of allocating a array with the two strings in it. --- Scripts/NodeDataCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/NodeDataCache.cs b/Scripts/NodeDataCache.cs index 966b18f..f97636e 100644 --- a/Scripts/NodeDataCache.cs +++ b/Scripts/NodeDataCache.cs @@ -97,7 +97,7 @@ namespace XNode { foreach (NodePort listPort in dynamicListPorts) { // At this point we know that ports here are dynamic list ports // which have passed name/"backing port" checks, ergo we can proceed more safely. - string backingPortName = listPort.fieldName.Split(' ')[0]; + string backingPortName = listPort.fieldName.Substring(0, listPort.fieldName.IndexOf(' ')); NodePort backingPort = staticPorts[backingPortName]; // Update port constraints. Creating a new port instead will break the editor, mandating the need for setters.