MCPcopy Create free account
hub / github.com/ElementsProject/elements / NewIterator

Method NewIterator

src/leveldb/table/block.cc:255–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253};
254
255Iterator* Block::NewIterator(const Comparator* comparator) {
256 if (size_ < sizeof(uint32_t)) {
257 return NewErrorIterator(Status::Corruption("bad block contents"));
258 }
259 const uint32_t num_restarts = NumRestarts();
260 if (num_restarts == 0) {
261 return NewEmptyIterator();
262 } else {
263 return new Iter(comparator, data_, restart_offset_, num_restarts);
264 }
265}
266
267} // namespace leveldb

Callers

nothing calls this directly

Calls 3

NewErrorIteratorFunction · 0.85
CorruptionFunction · 0.85
NewEmptyIteratorFunction · 0.85

Tested by

no test coverage detected