diff options
Diffstat (limited to 'zencore/stream.cpp')
| -rw-r--r-- | zencore/stream.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zencore/stream.cpp b/zencore/stream.cpp index aa9705764..8faf90af2 100644 --- a/zencore/stream.cpp +++ b/zencore/stream.cpp @@ -25,6 +25,15 @@ BinaryWriter::Write(const void* data, size_t ByteCount, uint64_t Offset) memcpy(m_Buffer.data() + Offset, data, ByteCount); } +void +BinaryWriter::Reset() +{ + RwLock::ExclusiveLockScope _(m_Lock); + + m_Buffer.clear(); + m_Offset = 0; +} + ////////////////////////////////////////////////////////////////////////// // // Testing related code follows... |