diff options
| author | Dan Engelbrecht <[email protected]> | 2024-01-23 10:21:03 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-01-23 10:21:03 +0100 |
| commit | ff8d2e7c432c58114b528bfc9670eba7e387843c (patch) | |
| tree | 5dbb80fbab73835047794a56a76d45220b33571c /src/zencore/stream.cpp | |
| parent | add --ignore-missing-attachments to oplog-import command (#637) (diff) | |
| download | zen-ff8d2e7c432c58114b528bfc9670eba7e387843c.tar.xz zen-ff8d2e7c432c58114b528bfc9670eba7e387843c.zip | |
oplog import/export improvements (#634)
* improve feedback from oplog import/export
* improve oplog save performance
Diffstat (limited to 'src/zencore/stream.cpp')
| -rw-r--r-- | src/zencore/stream.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zencore/stream.cpp b/src/zencore/stream.cpp index ee97a53c4..13c90fd92 100644 --- a/src/zencore/stream.cpp +++ b/src/zencore/stream.cpp @@ -25,8 +25,9 @@ BinaryWriter::Write(std::initializer_list<const MemoryView> Buffers) } for (const MemoryView& View : Buffers) { - memcpy(m_Buffer.data() + m_Offset, View.GetData(), View.GetSize()); - m_Offset += View.GetSize(); + size_t Size = View.GetSize(); + memcpy(m_Buffer.data() + m_Offset, View.GetData(), Size); + m_Offset += Size; } } |