20 assert(a_pos >= 0 && a_pos <
size());
26 assert(a_pos >= 0 && a_pos <
size());
35 [[nodiscard]]
const T*
data()
const
90 [[nodiscard]]
bool empty()
const
108 size_type newSize = a_newCap *
sizeof(T);
109 T* newMem =
static_cast<T*
>(allocator->BufAlloc(newSize));
110 std::memset(newMem, 0, newSize);
113 std::memcpy(newMem,
_data, oldSize);
115 allocator->BufFree(
_data, oldSize);
140 if (a_count ==
size()) {
144 if (a_count <
size()) {
152 T* newMem =
static_cast<T*
>(allocator->BufAlloc(newSize));
157 allocator->BufFree(
_data, oldSize);
161 if (a_count >
size()) {
163 new (&newMem[i]) T{};
188 template <
class T,
class Allocator =
void>
195 template <
class T, std::
size_t N,
class Allocator =
void>
iterator begin()
Definition: hkArray.h:60
void resize(size_type a_count)
Definition: hkArray.h:137
const_iterator cbegin() const
Definition: hkArray.h:70
std::int32_t _size
Definition: hkArray.h:183
const T * data() const
Definition: hkArray.h:35
const_reference back() const
Definition: hkArray.h:55
bool empty() const
Definition: hkArray.h:90
std::int32_t _capacityAndFlags
Definition: hkArray.h:184
value_type & reference
Definition: hkArray.h:13
T value_type
Definition: hkArray.h:11
@ kFlagMask
Definition: hkArray.h:176
@ kDontDeallocFlag
Definition: hkArray.h:177
@ kCapacityMask
Definition: hkArray.h:175
T * data()
Definition: hkArray.h:30
const_reference operator[](size_type a_pos) const
Definition: hkArray.h:24
const T * const_iterator
Definition: hkArray.h:16
void reserve(size_type a_newCap)
Definition: hkArray.h:100
reference back()
Definition: hkArray.h:50
reference operator[](size_type a_pos)
Definition: hkArray.h:18
const_iterator begin() const
Definition: hkArray.h:65
const_iterator end() const
Definition: hkArray.h:80
size_type size() const noexcept
Definition: hkArray.h:95
T * _data
Definition: hkArray.h:182
void push_back(const T &a_value)
Definition: hkArray.h:129
const_reference front() const
Definition: hkArray.h:45
static constexpr float GROWTH_FACTOR
Definition: hkArray.h:180
reference front()
Definition: hkArray.h:40
iterator end()
Definition: hkArray.h:75
std::int32_t size_type
Definition: hkArray.h:12
const value_type & const_reference
Definition: hkArray.h:14
const_iterator cend() const
Definition: hkArray.h:85
size_type capacity() const noexcept
Definition: hkArray.h:124
T * iterator
Definition: hkArray.h:15
Definition: hkArray.h:190
Definition: hkArray.h:197
T storage[N]
Definition: hkArray.h:199
NiColor() min(const NiColor &a_lhs, const NiColor &a_rhs)
Definition: ColorUtil.h:63
Definition: AbsorbEffect.h:6
static Allocator * GetSingleton()
Definition: hkContainerAllocators.h:25