MCPcopy Create free account
hub / github.com/Snapchat/Valdi / toEntryIndex

Method toEntryIndex

valdi_core/src/valdi_core/cpp/Utils/ReferenceTable.cpp:121–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121size_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
131void ReferenceTable::checkEntry(SequenceID id, const ReferenceTableEntry& entry) {
132 if (entry.retainCount == 0 || entry.id != id) {

Callers

nothing calls this directly

Calls 3

handleFatalErrorFunction · 0.70
getIndexMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected