FastLED 3.10.6
Loading...
Searching...
No Matches

◆ deque_grow_map_capacity()

FL_NO_INLINE fl::size fl::detail::deque_grow_map_capacity ( fl::size current_map_capacity,
fl::size min_required_chunks )

Definition at line 13 of file deque_basic.cpp.hpp.

14 {
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}
@ kDequeInitialMapCapacity
Definition deque_basic.h:29

References fl::FL_NO_EXCEPT, and kDequeInitialMapCapacity.

Referenced by fl::deque< int >::grow_map().

+ Here is the caller graph for this function: