FastLED
3.10.8
Loading...
Searching...
No Matches
◆
rehash_internal()
template<typename
Key
, typename T, typename
Hash
= Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
void
fl::unordered_map
<
Key
, T,
Hash
, KeyEqual, INLINED_COUNT >::rehash_internal
(
fl::size
new_cap
)
inline
private
Definition at line
914
of file
unordered_map.h
.
914
{
915
new_cap
=
next_power_of_two
(
new_cap
);
916
fl::vector_inlined<Entry, INLINED_COUNT>
old
(
_buckets
.get_resource());
917
fl::bitset<1024>
old_occupied
=
_occupied
;
918
919
_buckets
.swap(
old
);
920
_buckets
.clear();
921
_buckets
.assign(
new_cap
,
Entry
{});
922
923
_occupied
.reset();
924
_occupied
.resize(
new_cap
);
925
_deleted
.reset();
926
_deleted
.resize(
new_cap
);
927
928
_size
=
_tombstones
= 0;
929
930
for
(
fl::size
i
= 0;
i
<
old
.
size
();
i
++) {
931
if
(
old_occupied
.test(
i
))
932
insert
(
fl::move
(
old
[
i
].
key
),
fl::move
(
old
[
i
].
value
));
933
}
934
}
fl::unordered_map::_occupied
fl::bitset< 1024 > _occupied
Definition
unordered_map.h:1049
fl::unordered_map::size
fl::size size() const FL_NO_EXCEPT
Definition
unordered_map.h:728
fl::unordered_map::_buckets
fl::vector_inlined< Entry, INLINED_COUNT > _buckets
Definition
unordered_map.h:1045
fl::unordered_map::insert
pair< iterator, bool > insert(const Key &key, const T &value) FL_NO_EXCEPT
Definition
unordered_map.h:325
fl::unordered_map::_size
fl::size _size
Definition
unordered_map.h:1046
fl::unordered_map::_tombstones
fl::size _tombstones
Definition
unordered_map.h:1047
fl::unordered_map::_deleted
fl::bitset< 1024 > _deleted
Definition
unordered_map.h:1050
fl::unordered_map::next_power_of_two
static fl::size next_power_of_two(fl::size n) FL_NO_EXCEPT
Definition
unordered_map.h:841
fl::unordered_map
Definition
unordered_map.h:59
fl
unordered_map
Generated on Sun Oct 18 2026 00:57:09 for FastLED by
1.13.2