This commit is contained in:
Wojtek Figat
2021-07-05 21:52:34 +02:00
parent 44c4ab6580
commit 2585c02b68
3 changed files with 17 additions and 12 deletions

View File

@@ -466,6 +466,17 @@ public:
_count++;
}
/// <summary>
/// Adds the specified item to the collection.
/// </summary>
/// <param name="item">The item to add.</param>
void Add(T&& item)
{
EnsureCapacity(_count + 1);
Memory::MoveItems(_allocation.Get() + _count, &item, 1);
_count++;
}
/// <summary>
/// Adds the specified item to the collection.
/// </summary>