MCPcopy Create free account
hub / github.com/ceph/ceph / contains

Method contains

src/include/interval_set.h:464–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462 }
463
464 bool contains(T i, T *pstart=0, T *plen=0) const {
465 auto p = find_inc(i);
466 if (p == m.end()) return false;
467 if (p->first > i) return false;
468 if (p->first+p->second <= i) return false;
469 ceph_assert(p->first <= i && p->first+p->second > i);
470 if (pstart)
471 *pstart = p->first;
472 if (plen)
473 *plen = p->second;
474 return true;
475 }
476 bool contains(T start, T len) const {
477 auto p = find_inc(start);
478 if (p == m.end()) return false;

Callers 1

subset_ofMethod · 0.45

Calls 2

endMethod · 0.45
intersection_ofMethod · 0.45

Tested by

no test coverage detected