FastLED
3.9.15
Loading...
Searching...
No Matches
◆
rehash()
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
(
fl::size
n
)
inline
Definition at line
773
of file
unordered_map.h
.
773
{
774
// Ensure n is at least as large as the current number of elements
775
fl::size
min_buckets
=
_size
;
776
if
(
n
<
min_buckets
) {
777
n
=
min_buckets
;
778
}
779
780
// Only rehash if we need more buckets than we currently have
781
if
(
n
>
_buckets
.size()) {
782
rehash_internal
(
n
);
783
}
784
// If n <= current bucket count, do nothing (std::unordered_map behavior)
785
}
fl::unordered_map::_buckets
fl::vector_inlined< Entry, INLINED_COUNT > _buckets
Definition
unordered_map.h:1117
fl::unordered_map::_size
fl::size _size
Definition
unordered_map.h:1118
fl::unordered_map::rehash_internal
void rehash_internal(fl::size new_cap)
Definition
unordered_map.h:984
fl::unordered_map
Definition
unordered_map.h:58
fl
unordered_map
Generated on Tue Jun 16 2026 00:07:07 for FastLED by
1.13.2