fix mismatched allocator warning

This commit is contained in:
Nathan Strong 2022-10-25 22:41:53 -07:00 committed by Serge Lamikhov-Center
parent ac542cbb8b
commit 04985836db

View File

@ -223,7 +223,7 @@ template <class T> class section_impl : public section
// reallocate data to be the correct size
data.reset( new (std::nothrow) char[size_t(uncompressed_size) + 1]);
// create a buffer to hold the compressed bits
auto compressed_data = std::unique_ptr<char>(new char[size_t(size)]);
auto compressed_data = std::unique_ptr<char[]>(new char[size_t(size)]);
if( data == nullptr || compressed_data == nullptr) {
std::cerr << "failed to allocate memory buffers for decompression" << std::endl;
return false;