Add ToSpan for MemoryWriteStream and simplify code with it
This commit is contained in:
@@ -44,7 +44,7 @@ public:
|
||||
return CreateAssetResult::Error;
|
||||
if (context.AllocateChunk(0))
|
||||
return CreateAssetResult::CannotAllocateChunk;
|
||||
context.Data.Header.Chunks[0]->Data.Copy(stream.GetHandle(), stream.GetPosition());
|
||||
context.Data.Header.Chunks[0]->Data.Copy(ToSpan(stream));
|
||||
|
||||
return CreateAssetResult::Ok;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user