summaryrefslogtreecommitdiff
path: root/source/libs/asura-lib-utils/filesystem/data_buffer.cpp
blob: 629dc92f033584ac5dce390587f440e1e427062f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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; 
		}

	}
}