Replace C# if statement with switch statement to match GDScript (#5018)

This commit is contained in:
hpnrep6
2021-06-19 18:12:35 -04:00
committed by GitHub
parent f18d88c74e
commit e7e6017ebe

View File

@@ -257,14 +257,18 @@ tree structures.
public override void Notification(int what)
{
if (what == NotificationPredelete)
switch (what)
{
foreach (object child in _children)
{
TreeNode node = child as TreeNode;
if (node != null)
node.Free();
}
case NotificationPredelete:
foreach (object child in _children)
{
TreeNode node = child as TreeNode;
if (node != null)
node.Free();
}
break;
default:
break;
}
}
}