46608 {
46609
46610 if (++idx_in_entry == occupied_mask::BITS_PER_VALUE) {
46611 NextEntry();
46612 }
46613
46614 auto end = map.end();
46615 while (*this < end) {
46616 const auto &entry = map.occupied.GetValidityEntryUnsafe(entry_idx);
46617 if (entry ==
static_cast<uint8_t>(~occupied_mask::ValidityBuffer::MAX_ENTRY)) {
46618
46619 if (entry_idx == end.entry_idx) {
46620
46621 idx_in_entry = end.idx_in_entry;
46622 break;
46623 }
46624 NextEntry();
46625 } else {
46626
46627 const auto idx_to = entry_idx == end.entry_idx ? end.idx_in_entry : occupied_mask::BITS_PER_VALUE;
46628 for (; idx_in_entry < idx_to; idx_in_entry++) {
46629 if (map.occupied.RowIsValid(entry, idx_in_entry)) {
46630
46631 return *this;
46632 }
46633 }
46634
46635 if (*this != end) {
46636 NextEntry();
46637 }
46638 }
46639 }
46640 return *this;
46641 }