Skip to content

Commit

Permalink
Add TomlArray constructor with capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Feb 10, 2019
1 parent ab57e5f commit 0e4d727
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SharpToml/Model/TomlObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ public class TomlArray : TomlObject, IList<object>

public TomlArray() : base(ObjectKind.Array)
{
_items = new List<TomlObject>();
}

public TomlArray(int capacity) : base(ObjectKind.Array)
{
_items = new List<TomlObject>(capacity);
}

public IEnumerator<object> GetEnumerator()
Expand Down

0 comments on commit 0e4d727

Please sign in to comment.