1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

use array instead of list in a enumeration we wont change

This commit is contained in:
Simon Rodriguez 2022-11-02 09:11:27 +01:00
parent 5201808eff
commit bdbb287f00

View File

@ -46,7 +46,7 @@ namespace XNode {
// 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.
// Loop through current node ports
foreach (NodePort port in ports.Values.ToList()) {
foreach (NodePort port in ports.Values.ToArray()) {
// If port still exists, check it it has been changed
NodePort staticPort;
if (staticPorts.TryGetValue(port.fieldName, out staticPort)) {