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

Function Resize

Source/Engine/Core/Collections/BitArray.h:265–270  ·  view source on GitHub ↗

Resizes the collection to the specified size. If the size is equal or less to the current capacity no additional memory reallocation in performed. The new collection size. True if preserve collection data when changing its size, otherwise collection after resize might not contain the previous data.

Source from the content-addressed store, hash-verified

263 /// <param name="size">The new collection size.</param>
264 /// <param name="preserveContents">True if preserve collection data when changing its size, otherwise collection after resize might not contain the previous data.</param>
265 void Resize(const int32 size, const bool preserveContents = true)
266 {
267 if (_count <= size)
268 EnsureCapacity(size, preserveContents);
269 _count = size;
270 }
271
272 /// <summary>
273 /// Ensures the collection has given capacity (or more).

Callers 15

AssignMethod · 0.50
ShrinkToFitMethod · 0.50
ExpandMethod · 0.50
ReleaseAllMethod · 0.50
ArrangeMethod · 0.50
TrimToNullTerminatorMethod · 0.50
ResizeDirectXTexMethod · 0.50
OnSurfaceLoadedMethod · 0.50

Calls 1

EnsureCapacityFunction · 0.85

Tested by

no test coverage detected