MCPcopy Create free account
hub / github.com/Siv3D/OpenSiv3D / read

Method read

Siv3D/src/Siv3D/MemoryReader/SivMemoryReader.cpp:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 int64 MemoryReader::read(void* dst, const int64 size)
65 {
66 if (not dst)
67 {
68 return 0;
69 }
70
71 const int64 readSize = Clamp<int64>(size, 0, (m_blob.size() - m_pos));
72
73 std::memcpy(dst, (m_blob.data() + m_pos), static_cast<size_t>(readSize));
74
75 m_pos += readSize;
76
77 return readSize;
78 }
79
80 int64 MemoryReader::read(void* dst, const int64 pos, const int64 size)
81 {

Callers 1

FromFileFunction · 0.45

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected