| 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; |
no test coverage detected