MCPcopy Create free account
hub / github.com/comaps/comaps / LoadBytes

Function LoadBytes

libs/indexer/data_header.cpp:34–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33template <class Source, class Cont>
34void LoadBytes(Source & src, Cont & cont)
35{
36 static_assert(sizeof(typename Cont::value_type) == 1);
37 ASSERT(cont.empty(), ());
38
39 auto const count = ReadVarUint<uint32_t>(src);
40 if (count > 0)
41 {
42 cont.resize(count);
43 src.Read(&cont[0], count);
44 }
45}
46} // namespace
47
48DataHeader::DataHeader(std::string const & fileName) : DataHeader((FilesContainerR(GetPlatform().GetReader(fileName))))

Callers 1

LoadMethod · 0.85

Calls 4

ASSERTFunction · 0.85
emptyMethod · 0.45
resizeMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected