Commit 9d731ea3 authored by pruthvi's avatar pruthvi

- fix failing unit test case

- added support in copy and assignment operator of Alignedbuffer to handle allocator
parent 3d438371
......@@ -49,10 +49,12 @@ runtime::AlignedBuffer::AlignedBuffer(size_t byte_size, size_t alignment, Alloca
}
runtime::AlignedBuffer::AlignedBuffer(AlignedBuffer&& other)
: m_allocated_buffer(other.m_allocated_buffer)
: m_allocator(other.m_allocator)
, m_allocated_buffer(other.m_allocated_buffer)
, m_aligned_buffer(other.m_aligned_buffer)
, m_byte_size(other.m_byte_size)
{
other.m_allocator = nullptr;
other.m_allocated_buffer = nullptr;
other.m_aligned_buffer = nullptr;
other.m_byte_size = 0;
......@@ -70,9 +72,11 @@ runtime::AlignedBuffer& runtime::AlignedBuffer::operator=(AlignedBuffer&& other)
{
if (this != &other)
{
m_allocator = other.m_allocator;
m_allocated_buffer = other.m_allocated_buffer;
m_aligned_buffer = other.m_aligned_buffer;
m_byte_size = other.m_byte_size;
other.m_allocator = nullptr;
other.m_allocated_buffer = nullptr;
other.m_aligned_buffer = nullptr;
other.m_byte_size = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment