MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / WriteBlock

Method WriteBlock

src/Nazara/Core/MemoryStream.cpp:131–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 */
130
131 std::size_t MemoryStream::WriteBlock(const void* buffer, std::size_t size)
132 {
133 std::size_t endPos = static_cast<std::size_t>(m_pos + size);
134 if (endPos > m_buffer->GetSize())
135 m_buffer->Resize(endPos);
136
137 NazaraAssert(buffer, "Invalid buffer");
138
139 std::memcpy(m_buffer->GetBuffer() + m_pos, buffer, size);
140
141 m_pos = endPos;
142 return size;
143 }
144}

Callers

nothing calls this directly

Calls 3

GetSizeMethod · 0.45
ResizeMethod · 0.45
GetBufferMethod · 0.45

Tested by

no test coverage detected