MCPcopy Create free account
hub / github.com/FastLED/FastLED / lower_bound_impl

Function lower_bound_impl

src/fl/stl/algorithm.h:442–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440// Find the position where value should be inserted in sorted range [first, last)
441template <typename Iterator, typename T, typename Compare>
442Iterator lower_bound_impl(Iterator first, Iterator last, const T& value, Compare comp) FL_NOEXCEPT {
443 auto count = last - first;
444 while (count > 0) {
445 auto step = count / 2;
446 Iterator it = first + step;
447 if (comp(*it, value)) {
448 first = ++it;
449 count -= step + 1;
450 } else {
451 count = step;
452 }
453 }
454 return first;
455}
456
457// In-place merge operation for merge sort (stable sort)
458template <typename Iterator, typename Compare>

Callers 2

merge_inplaceFunction · 0.85
lower_boundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected