From 0b8280d4fcbf3a65997c3cc86cf14f5f7c44b7fe Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 13 May 2021 12:01:18 +0200 Subject: Made SharedBuffer/UniqueBuffer share guts with IoBuffer This enables way more efficient marshaling of compact binary objects and attachments --- zencore/compactbinary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zencore/compactbinary.cpp') diff --git a/zencore/compactbinary.cpp b/zencore/compactbinary.cpp index 4ee9e9281..cae6c506d 100644 --- a/zencore/compactbinary.cpp +++ b/zencore/compactbinary.cpp @@ -1079,7 +1079,7 @@ LoadCompactBinary(BinaryReader& Ar, BufferAllocator Allocator) // Allocate the buffer, copy the header, and read the remainder of the field. UniqueBuffer Buffer = Allocator(FieldSize); ZEN_ASSERT(Buffer.GetSize() == FieldSize); - MutableMemoryView View = Buffer.GetView(); + MutableMemoryView View = Buffer.GetMutableView(); memcpy(View.GetData(), HeaderBytes.data(), HeaderBytes.size()); View.RightChopInline(HeaderBytes.size()); if (!View.IsEmpty()) -- cgit v1.2.3