diff options
Diffstat (limited to 'source/libs/asura-lib-utils/filesystem/data_buffer.cpp')
-rw-r--r-- | source/libs/asura-lib-utils/filesystem/data_buffer.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/libs/asura-lib-utils/filesystem/data_buffer.cpp b/source/libs/asura-lib-utils/filesystem/data_buffer.cpp new file mode 100644 index 0000000..629dc92 --- /dev/null +++ b/source/libs/asura-lib-utils/filesystem/data_buffer.cpp @@ -0,0 +1,29 @@ +#include "data_buffer.h" + +namespace AsuraEngine +{ + namespace Filesystem + { + + DataBuffer::DataBuffer(const void* data, std::size_t size) + { + this->data = (const byte*)data; + this->size = size; + } + + DataBuffer::~DataBuffer() + { + delete[] data; + } + + void DataBuffer::SetContent(const void* data, std::size_t siez) + { + if (this->data != nullptr) + delete[] this->data; + + this->data = (const byte*)data; + this->size = size; + } + + } +}
\ No newline at end of file |