mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Replace C# if statement with switch statement to match GDScript (#5018)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user