remove operator=

This commit is contained in:
TurtleP 2023-01-04 14:56:39 -05:00
parent 668d29ad31
commit 9e72a73646
5 changed files with 18 additions and 4 deletions

View File

@ -18,6 +18,8 @@ public:
CCmdMemRing(const CCmdMemRing&) = delete;
CCmdMemRing& operator=(const CCmdMemRing&) = delete;
~CCmdMemRing()
{
m_mem.destroy();

View File

@ -20,7 +20,9 @@ public:
CDescriptorSet() : m_mem{} { }
CDescriptorSet(const CDescriptorSet&) = delete;
CDescriptorSet& operator=(const CDescriptorSet&) = delete;
~CDescriptorSet()
{
m_mem.destroy();

View File

@ -15,7 +15,9 @@ public:
CExternalImage() : m_image{}, m_descriptor{}, m_mem{} { }
CExternalImage(const CExternalImage&) = delete;
CExternalImage& operator=(const CExternalImage&) = delete;
~CExternalImage()
{
m_mem.destroy();

View File

@ -22,6 +22,8 @@ class CMemPool
Block(const Block&) = delete;
Block& operator=(const Block&) = delete;
constexpr void* cpuOffset(uint32_t offset) const
{
return m_cpuAddr ? ((u8*)m_cpuAddr + offset) : nullptr;
@ -45,7 +47,9 @@ class CMemPool
uint32_t m_end;
Slice(const Slice&) = delete;
Slice& operator=(const Slice&) = delete;
constexpr uint32_t getSize() const { return m_end - m_start; }
constexpr bool canCoalesce(Slice const& rhs) const { return m_pool == rhs.m_pool && m_block == rhs.m_block && m_end == rhs.m_start; }
@ -119,6 +123,8 @@ public:
Handle allocate(uint32_t size, uint32_t alignment = DK_CMDMEM_ALIGNMENT);
CMemPool(const CMemPool&) = delete;
CMemPool& operator=(const CMemPool&) = delete;
};
constexpr bool operator<(uint32_t lhs, CMemPool::Slice const& rhs)

View File

@ -14,7 +14,9 @@ public:
CShader() : m_shader{}, m_codemem{} { }
CShader(const CShader&) = delete;
CShader& operator=(const CShader&) = delete;
~CShader()
{
m_codemem.destroy();