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

Method lookahead

Siv3D/src/Siv3D/MemoryReader/SivMemoryReader.cpp:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 int64 MemoryReader::lookahead(void* dst, const int64 size) const
102 {
103 if (not dst)
104 {
105 return 0;
106 }
107
108 const int64 readSize = Clamp<int64>(size, 0, (m_blob.size() - m_pos));
109
110 std::memcpy(dst, (m_blob.data() + m_pos), static_cast<size_t>(readSize));
111
112 return readSize;
113 }
114
115 int64 MemoryReader::lookahead(void* dst, const int64 pos, const int64 size) const
116 {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected