C++14 + use make_unique and make_shared to make shared pointers

This commit is contained in:
Benjamin Sergeant
2019-01-11 21:25:06 -08:00
parent 7fabd14a63
commit a0f15bfb56
13 changed files with 23 additions and 20 deletions

View File

@ -55,7 +55,8 @@ namespace ix
if (ret != Z_OK) return false;
_compressBuffer.reset(new unsigned char[_compressBufferSize]);
_compressBuffer = std::make_unique<unsigned char[]>(_compressBufferSize);
_flush = (clientNoContextTakeOver)
? Z_FULL_FLUSH
: Z_SYNC_FLUSH;
@ -153,7 +154,8 @@ namespace ix
if (ret != Z_OK) return false;
_compressBuffer.reset(new unsigned char[_compressBufferSize]);
_compressBuffer = std::make_unique<unsigned char[]>(_compressBufferSize);
_flush = (clientNoContextTakeOver)
? Z_FULL_FLUSH
: Z_SYNC_FLUSH;