Added unsigned int constructor to ByteArray/String classes
Former-commit-id: 2b52c0dabcd6fbf4ad33b31ef3cb84e668edcd54
This commit is contained in:
@@ -29,6 +29,19 @@ m_sharedArray(&emptyArray)
|
||||
{
|
||||
}
|
||||
|
||||
NzByteArray::NzByteArray(unsigned int size)
|
||||
{
|
||||
if (size > 0)
|
||||
{
|
||||
m_sharedArray = new SharedArray;
|
||||
m_sharedArray->buffer = new nzUInt8[size];
|
||||
m_sharedArray->capacity = size;
|
||||
m_sharedArray->size = size;
|
||||
}
|
||||
else
|
||||
m_sharedArray = &emptyArray;
|
||||
}
|
||||
|
||||
NzByteArray::NzByteArray(const void* buffer, unsigned int size)
|
||||
{
|
||||
if (size > 0)
|
||||
|
||||
Reference in New Issue
Block a user