Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TArray
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void RemoveAtSwap
(
SizeType Index, |
Removes an element at the given location, optionally shrinking the array. | Containers/Array.h | |
void RemoveAtSwap
(
SizeType Index, |
Removes an element (or elements) at given location, optionally shrinking the array. | Containers/Array.h | |
void RemoveAtSwap
(
SizeType Index, |
Containers/Array.h |
RemoveAtSwap(SizeType, EAllowShrinking)
Description
Removes an element at the given location, optionally shrinking the array.
This version is much more efficient than RemoveAt (O(Count) instead of O(ArrayNum)), but does not preserve the order.
| Name | RemoveAtSwap |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
void RemoveAtSwap
(
SizeType Index,
EAllowShrinking AllowShrinking
)
Parameters
| Name | Remarks |
|---|---|
| Index | Location in array of the element to remove. |
| AllowShrinking | (Optional) By default, arrays with large amounts of slack will automatically shrink. Use FNonshrinkingAllocator or pass EAllowShrinking::No to prevent this. |
RemoveAtSwap(SizeType, CountType, EAllowShrinking)
Description
Removes an element (or elements) at given location, optionally shrinking the array.
This version is much more efficient than RemoveAt (O(Count) instead of O(ArrayNum)), but does not preserve the order.
| Name | RemoveAtSwap |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<UE::CIntegral CountType>
void RemoveAtSwap
(
SizeType Index,
CountType Count,
EAllowShrinking AllowShrinking
)
Parameters
| Name | Remarks |
|---|---|
| Index | Location in array of the element to remove. |
| Count | (Optional) Number of elements to remove. Default is 1. |
| AllowShrinking | (Optional) By default, arrays with large amounts of slack will automatically shrink. Use FNonshrinkingAllocator or pass EAllowShrinking::No to prevent this. |
RemoveAtSwap(SizeType, CountType, bool)
| Name | RemoveAtSwap |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
template<typename CountType>
void RemoveAtSwap
(
SizeType Index,
CountType Count,
bool bAllowShrinking
)