Skip to content

Commit 247e021

Browse files
Epica3055Tanya-Solyanik
authored andcommitted
minor changes
1 parent c7c7953 commit 247e021

File tree

1 file changed

+3
-3
lines changed
  • src/System.Windows.Forms/src/System/Windows/Forms

1 file changed

+3
-3
lines changed

src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ internal TreeNodeImageIndexer StateImageIndexer
9595
internal int index; // our index into our parents child array
9696
internal int childCount;
9797
// this array should not be optimized as a list because we are inserting into the middle of it, not appending.
98-
internal TreeNode[] children = [];
98+
internal TreeNode[] children;
9999
internal TreeNode parent;
100100
internal TreeView treeView;
101101
private bool expandOnRealization;
@@ -1379,7 +1379,7 @@ internal void Clear()
13791379
children[childCount - 1].Remove(true);
13801380
}
13811381

1382-
children = [];
1382+
children = null;
13831383

13841384
if (tv is not null && isBulkOperation)
13851385
{
@@ -1672,7 +1672,7 @@ internal void EnsureCapacity(int num)
16721672
size = 4;
16731673
}
16741674

1675-
if (children is null || children.Length == 0)
1675+
if (children is null)
16761676
{
16771677
children = new TreeNode[size];
16781678
}

0 commit comments

Comments
 (0)