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

Function max_element

src/fl/stl/algorithm.h:18–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17template <typename Iterator>
18Iterator max_element(Iterator first, Iterator last) FL_NOEXCEPT {
19 if (first == last) {
20 return last;
21 }
22
23 Iterator max_iter = first;
24 ++first;
25
26 while (first != last) {
27 if (*max_iter < *first) {
28 max_iter = first;
29 }
30 ++first;
31 }
32
33 return max_iter;
34}
35
36template <typename Iterator, typename Compare>
37Iterator max_element(Iterator first, Iterator last, Compare comp) FL_NOEXCEPT {

Callers 1

FL_TEST_FILEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected