MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / getChunk

Method getChunk

src/core/chunk/chunkFile.cpp:85–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84
85Chunk const * ChunkFile::getChunk(ChunkId const chunkId) const
86{
87 if (!chunkId.valid()) {
88 return nullptr;
89 }
90
91 // XXXX manuelk augment this w/ map for faster search
92 for (auto const & chunk : _chunks) {
93 if (chunk && chunk->chunkId == chunkId) {
94 return chunk.get();
95 }
96 }
97 return nullptr;
98}
99
100void ChunkFile::getChunks(uint32_t chunkType, std::vector<Chunk const *> & result) const
101{

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
validMethod · 0.45

Tested by

no test coverage detected