forked from eden-emu/eden
scratch_buffer: Explicitly defing resize and resize_destructive functions
resize keeps previous data intact when the buffer grows resize_destructive destroys the previous data when the buffer grows
This commit is contained in:
parent
64869807e2
commit
c6590ad07b
7 changed files with 108 additions and 19 deletions
|
|
@ -1926,7 +1926,7 @@ std::span<const u8> BufferCache<P>::ImmediateBufferWithData(VAddr cpu_addr, size
|
|||
|
||||
template <class P>
|
||||
std::span<u8> BufferCache<P>::ImmediateBuffer(size_t wanted_capacity) {
|
||||
immediate_buffer_alloc.resize(wanted_capacity);
|
||||
immediate_buffer_alloc.resize_destructive(wanted_capacity);
|
||||
return std::span<u8>(immediate_buffer_alloc.data(), wanted_capacity);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue