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 (or elements) at given location, then shrinks 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 (or elements) at given location, then shrinks 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) Tells if this call can shrink array if suitable after remove. Default is yes. |
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<typename CountType, std::enable_if_t<(std::is_integral_v< CountType >), int >>
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) Tells if this call can shrink array if suitable after remove. Default is yes. |
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
)