| 119 | } |
| 120 | |
| 121 | size_t ReferenceTable::toEntryIndex(SequenceID id) const { |
| 122 | auto index = static_cast<size_t>(id.getIndex()); |
| 123 | if (index >= _entries.size()) { |
| 124 | handleFatalError( |
| 125 | fmt::format("Out of bounds reference, max size is {}, provided index in id is {}", _entries.size(), index)); |
| 126 | } |
| 127 | |
| 128 | return index; |
| 129 | } |
| 130 | |
| 131 | void ReferenceTable::checkEntry(SequenceID id, const ReferenceTableEntry& entry) { |
| 132 | if (entry.retainCount == 0 || entry.id != id) { |
nothing calls this directly
no test coverage detected