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

Method upper_bound

src/fl/stl/flat_map.h:202–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200 }
201
202 iterator upper_bound(const Key& key) FL_NOEXCEPT {
203 // Binary search: find first element where key < element
204 iterator first = mData.begin();
205 size_type count = mData.size();
206
207 while (count > 0) {
208 size_type step = count / 2;
209 iterator it = first + step;
210 if (!mLess(key, it->first)) {
211 first = it + 1;
212 count -= step + 1;
213 } else {
214 count = step;
215 }
216 }
217 return first;
218 }
219
220 const_iterator upper_bound(const Key& key) const FL_NOEXCEPT {
221 // Binary search: find first element where key < element

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected