Use resize_no_construct when creating a buffer asset, since the initial data is going to be memcopy'd anyways. (#4249)

Signed-off-by: amzn-tommy <waltont@amazon.com>
This commit is contained in:
Tommy Walton
2021-09-22 15:48:43 -07:00
committed by GitHub
parent 62f7fbb665
commit 982bef8766
@@ -57,7 +57,7 @@ namespace AZ
// Only allocate buffer if initial data is not empty
if (initialData != nullptr && initialDataSize > 0)
{
bufferAsset->m_buffer.resize(descriptor.m_byteCount);
bufferAsset->m_buffer.resize_no_construct(descriptor.m_byteCount);
memcpy(bufferAsset->m_buffer.data(), initialData, initialDataSize);
}