5#include "Containers/Array.h"
10#ifndef CHAOS_CHECK_UNCHECKED_ARRAY
12#define CHAOS_CHECK_UNCHECKED_ARRAY 1
14#define CHAOS_CHECK_UNCHECKED_ARRAY 0
19#ifndef CHAOS_CARRAY_SENTINEL
20#define CHAOS_CARRAY_SENTINEL 0
28#if CHAOS_CARRAY_SENTINEL
29#define IF_CHAOS_CARRAY_SENTINEL(X) X
31#define IF_CHAOS_CARRAY_SENTINEL(X)
45 template<
typename T,
int32 N>
84 return NumElements == 0;
99 return Elements[
Index];
107 return Elements[
Index];
147 UE_DEPRECATED(5.5,
"Renamed to AddUinitialized() to match TArray API")
161 return NumElements++;
171 Elements[NumElements] = V;
174 return NumElements++;
184 Elements[NumElements] =
MoveTemp(V);
187 return NumElements++;
211 for (
int32 MoveIndex =
Index; MoveIndex < NumElements - 1; ++MoveIndex)
213 Elements[MoveIndex] =
MoveTemp(Elements[MoveIndex + 1]);
229 if (
Index < NumElements - 1)
270 return &Elements[NumElements];
277 return &Elements[NumElements];
287 static constexpr int32 SentinelValue = 0xA1B2C3D4;
289 void CheckSentinels()
const
291#if CHAOS_CARRAY_SENTINEL
320 template<
int32 NumInlineElements>
324#if !CHAOS_CHECK_UNCHECKED_ARRAY
332#if !CHAOS_CHECK_UNCHECKED_ARRAY
337 template<
typename T,
int32 N>
340 template<
typename T,
int32 N>
347template<
int32 NumInlineElements>
357template <
typename T,
int N>
#define ensureAlways( InExpression)
Definition AssertionMacros.h:466
#define check(expr)
Definition AssertionMacros.h:314
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_LOG(CategoryName, Verbosity, Format,...)
Definition LogMacros.h:270
#define IF_CHAOS_CARRAY_SENTINEL(X)
Definition UncheckedArray.h:31
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition UncheckedArray.h:330
@ RequireRangeCheck
Definition UncheckedArray.h:333
A c-style array of objects with non-shipping bounds checking.
Definition UncheckedArray.h:47
void Empty()
Set the number of elements to 0.
Definition UncheckedArray.h:137
int32 Max() const
Definition UncheckedArray.h:73
const ElementType * GetData() const
Definition UncheckedArray.h:245
int32 Num() const
Definition UncheckedArray.h:66
void Reset()
Set the number of elements to 0.
Definition UncheckedArray.h:126
void SetNum(const int32 InNum)
Set the number of elements in the array.
Definition UncheckedArray.h:114
T ElementType
Definition UncheckedArray.h:50
int32 Add(const ElementType &V)
Copy the element to the end of the array.
Definition UncheckedArray.h:167
TCArray()
Definition UncheckedArray.h:62
int32 AddUninitialized()
Increase the size of the array without re-initializing the new element.
Definition UncheckedArray.h:156
static TCArray< T, N > MakeEmpty()
Definition UncheckedArray.h:57
int32 Add()
Increase the size of the array without re-initializing the new element.
Definition UncheckedArray.h:148
ElementType * GetData()
Definition UncheckedArray.h:238
int32 Emplace(ElementType &&V)
Move the element to the end of the array.
Definition UncheckedArray.h:193
void RemoveAtSwap(const int32 Index)
Remove the element at the specified index Moves the last element into the gap.
Definition UncheckedArray.h:224
int32 Add(ElementType &&V)
Move the element to the end of the array.
Definition UncheckedArray.h:180
void RemoveAt(const int32 Index)
Remove the element at the specified index Moves all higher elements down to fill the gap.
Definition UncheckedArray.h:206
ElementType * begin()
Definition UncheckedArray.h:252
const ElementType & operator[](const int32 Index) const
Definition UncheckedArray.h:102
ElementType & operator[](const int32 Index)
Definition UncheckedArray.h:94
ElementType * end()
Definition UncheckedArray.h:266
const ElementType * end() const
Definition UncheckedArray.h:273
static TCArray< T, N > MakeFull()
Definition UncheckedArray.h:52
bool IsEmpty() const
Definition UncheckedArray.h:80
bool IsFull() const
Definition UncheckedArray.h:87
static const int32 MaxElements
Definition UncheckedArray.h:49
const ElementType * begin() const
Definition UncheckedArray.h:259
A fixed allocator without array bounds checking except in Debug builds.
Definition UncheckedArray.h:322
@ RequireRangeCheck
Definition UncheckedArray.h:325
Definition ContainerAllocationPolicies.h:1276
Definition ContainerAllocationPolicies.h:618
Definition SkeletalMeshComponent.h:307
U16 Index
Definition radfft.cpp:71
Definition ContainerAllocationPolicies.h:256
Definition IsContiguousContainer.h:16
static constexpr bool Value
Definition IsContiguousContainer.h:20