mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 14:51:41 +01:00
Perf. optimization
This commit is contained in:
parent
7d4aefe37e
commit
47cb578057
@ -78,11 +78,18 @@ namespace Capnp
|
||||
|
||||
Init(items.Count);
|
||||
|
||||
if (items is T[] array)
|
||||
{
|
||||
array.CopyTo(Data);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
this[i] = items[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implements <see cref="IEnumerable{T}"/>.
|
||||
|
Loading…
x
Reference in New Issue
Block a user