MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / AddZeroed

Method AddZeroed

Source/Engine/Core/Collections/Array.h:547–552  ·  view source on GitHub ↗

Adds the new items to the end of the collection, possibly reallocating the whole collection to fit. The new items will be zeroed. Warning! AddZeroed() will create items without calling the constructor and this is not appropriate for item types that require a constructor to function properly. The number of new items to add.

Source from the content-addressed store, hash-verified

545 /// </remarks>
546 /// <param name="count">The number of new items to add.</param>
547 void AddZeroed(const int32 count = 1)
548 {
549 EnsureCapacity(_count + count);
550 Platform::MemoryClear(_allocation.Get() + _count, count * sizeof(T));
551 _count += count;
552 }
553
554 /// <summary>
555 /// Insert the given item at specified index with keeping items order.

Callers 8

GetOrCreateStateMethod · 0.45
GetLayoutMethod · 0.45
InitMethod · 0.45
CreateSwapChainMethod · 0.45
InitMethod · 0.45

Calls 3

EnsureCapacityFunction · 0.85
MemoryClearFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected