| 506 | |
| 507 | template <typename Visit> |
| 508 | inline void VisitSetBitRunsVoid(const uint8_t* bitmap, int64_t offset, int64_t length, |
| 509 | Visit&& visit) { |
| 510 | if (bitmap == NULLPTR) { |
| 511 | // Assuming all set (as in a null bitmap) |
| 512 | visit(static_cast<int64_t>(0), static_cast<int64_t>(length)); |
| 513 | return; |
| 514 | } |
| 515 | SetBitRunReader reader(bitmap, offset, length); |
| 516 | while (true) { |
| 517 | const auto run = reader.NextRun(); |
| 518 | if (run.length == 0) { |
| 519 | break; |
| 520 | } |
| 521 | visit(run.position, run.length); |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | template <typename Visit> |
| 526 | inline Status VisitSetBitRuns(const std::shared_ptr<Buffer>& bitmap, int64_t offset, |
no test coverage detected