MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / Read

Method Read

src/Utilities/Stream.cpp:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42bool PhobosByteStream::Read(data_t* Value, size_t Size)
43{
44 bool ret = false;
45
46 if (this->Data.size() >= this->CurrentOffset + Size)
47 {
48 auto Position = &this->Data[this->CurrentOffset];
49 std::memcpy(Value, Position, Size);
50 ret = true;
51 }
52
53 this->CurrentOffset += Size;
54 return ret;
55}
56
57void PhobosByteStream::Write(const data_t* Value, size_t Size)
58{

Callers 3

LoadMethod · 0.95
ReadFromStreamMethod · 0.45
ReadBlockFromStreamMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected