FastLED
3.10.6
Loading...
Searching...
No Matches
deque_basic.cpp.hpp
Go to the documentation of this file.
1
// IWYU pragma: private, include "fl/stl/deque_basic.h"
2
//
3
// deque_basic: implementation of the shared chunk-map grow-policy helper
4
// used by every `fl::deque<T>` instantiation. See `deque_basic.h` for
5
// design rationale (FastLED #3270).
6
7
#include "
fl/stl/deque_basic.h
"
8
9
namespace
fl
{
10
namespace
detail
{
11
12
FL_NO_INLINE
13
fl::size
deque_grow_map_capacity
(fl::size current_map_capacity,
14
fl::size min_required_chunks)
FL_NO_EXCEPT
{
15
fl::size next = current_map_capacity == 0
16
?
static_cast<
fl::size
>
(
kDequeInitialMapCapacity
)
17
: current_map_capacity * 2;
18
while
(next < min_required_chunks) {
19
if
(next >
static_cast<
fl::size
>
(-1) / 2) {
20
// Saturate: doubling further would overflow fl::size.
21
return
min_required_chunks;
22
}
23
next *= 2;
24
}
25
return
next;
26
}
27
28
}
// namespace detail
29
}
// namespace fl
FL_NO_INLINE
#define FL_NO_INLINE
Definition
compiler_control.h:353
deque_basic.h
fl::detail::kDequeInitialMapCapacity
@ kDequeInitialMapCapacity
Definition
deque_basic.h:29
fl::detail::deque_grow_map_capacity
FL_NO_INLINE fl::size deque_grow_map_capacity(fl::size current_map_capacity, fl::size min_required_chunks) FL_NO_EXCEPT
Definition
deque_basic.cpp.hpp:13
fl::detail
Compile-time linker keep-alive hook for a single fl::Bus.
Definition
bus_info.h:57
fl::FL_NO_EXCEPT
InputGamut g FL_NO_EXCEPT
Definition
rgbw.h:121
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
fl
stl
deque_basic.cpp.hpp
Generated on Sun Oct 4 2026 23:09:01 for FastLED by
1.13.2