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

Function FileRead

libs/drape_frontend/arrow3d.cpp:88–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88size_t FileRead(void * file, void * dst, size_t bytes, void * userData)
89{
90 auto reader = static_cast<ReaderSource<ReaderPtr<Reader>> *>(userData);
91 CHECK(reader != nullptr, ());
92 auto const sz = reader->Size();
93 if (sz == 0)
94 return 0;
95
96 if (bytes > sz)
97 bytes = static_cast<size_t>(sz);
98
99 auto const p = reader->Pos();
100 reader->Read(dst, bytes);
101 CHECK_LESS_OR_EQUAL(p, reader->Pos(), ());
102 return static_cast<size_t>(reader->Pos() - p);
103}
104
105unsigned long FileSize(void * file, void * userData)
106{

Callers

nothing calls this directly

Calls 3

SizeMethod · 0.45
PosMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected