| 726 | } |
| 727 | |
| 728 | std::unique_ptr<short unsigned int[]> takeNextBucketHash() |
| 729 | { |
| 730 | if (m_mappedData == m_data) { |
| 731 | // mmapped data, we need to copy the next bucket hash |
| 732 | auto ret = std::make_unique<short unsigned int[]>(NextBucketHashSize); |
| 733 | std::copy_n(m_nextBucketHash, NextBucketHashSize, ret.get()); |
| 734 | std::fill_n(m_nextBucketHash, NextBucketHashSize, 0); |
| 735 | return ret; |
| 736 | } |
| 737 | |
| 738 | // otherwise we can just take the pointer directly |
| 739 | return std::unique_ptr<short unsigned int[]>(std::exchange(m_nextBucketHash, nullptr)); |
| 740 | } |
| 741 | |
| 742 | uint available() const |
| 743 | { |
no test coverage detected