Saveload: Add span overloads to ReadBuffer and MemoryDumper

This commit is contained in:
Jonathan G Rennison
2024-02-06 19:06:37 +00:00
parent 17712af318
commit 9492aa1c0d

View File

@@ -125,6 +125,11 @@ struct ReadBuffer {
}
}
inline void CopyBytes(std::span<byte> buffer)
{
this->CopyBytes(buffer.data(), buffer.size());
}
/**
* Get the size of the memory dump made so far.
* @return The size.
@@ -209,6 +214,11 @@ struct MemoryDumper {
}
}
inline void CopyBytes(std::span<const byte> buffer)
{
this->CopyBytes(buffer.data(), buffer.size());
}
inline void RawWriteByte(byte b)
{
*this->buf++ = b;