mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Add move-assignment semantics to ActiveCommandBuffer
/MegaBuffer
We need move-assignment semantics to viably utilize these objects as class members, they cannot be replaced without move-assign (or copy-assign but that is undesirable here). This commit fixes that by introducing a move assignment operator to them while making the `slot` a pointer which has the necessary nullability semantics.
This commit is contained in:
@ -60,7 +60,7 @@ namespace skyline::gpu {
|
||||
*/
|
||||
class MegaBuffer {
|
||||
private:
|
||||
BufferManager::MegaBufferSlot &slot;
|
||||
BufferManager::MegaBufferSlot *slot;
|
||||
span<u8> freeRegion; //!< The unallocated space in the megabuffer
|
||||
|
||||
public:
|
||||
@ -68,6 +68,8 @@ namespace skyline::gpu {
|
||||
|
||||
~MegaBuffer();
|
||||
|
||||
MegaBuffer &operator=(MegaBuffer &&other);
|
||||
|
||||
/**
|
||||
* @brief Resets the free region of the megabuffer to its initial state, data is left intact but may be overwritten
|
||||
*/
|
||||
|
Reference in New Issue
Block a user