diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-06-08 10:16:43 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-06-08 10:16:43 +0200 |
commit | a9866bb7e45461f47bcaec272a95ecc869bc5ac9 (patch) | |
tree | c79f03c93eb9d9bd21f4adf9d59996ba81d0741c /TAO/tests | |
parent | 04fcadef2677421412a225cea383f7909153d3d2 (diff) | |
download | ATCD-a9866bb7e45461f47bcaec272a95ecc869bc5ac9.tar.gz |
Replaced ACE_Byte_Array_ptr with std::unique_ptr usage
* TAO/tests/Compression/RLECompressorTest.cpp:
Diffstat (limited to 'TAO/tests')
-rw-r--r-- | TAO/tests/Compression/RLECompressorTest.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/TAO/tests/Compression/RLECompressorTest.cpp b/TAO/tests/Compression/RLECompressorTest.cpp index b25d6623c49..085f655f79e 100644 --- a/TAO/tests/Compression/RLECompressorTest.cpp +++ b/TAO/tests/Compression/RLECompressorTest.cpp @@ -9,14 +9,6 @@ #include <memory> -struct ACE_Byte_Array_ptr : std::unique_ptr<ACE_Byte> { - explicit ACE_Byte_Array_ptr(ACE_Byte *_Ptr = 0) - : std::unique_ptr<ACE_Byte>(_Ptr) {} - ~ACE_Byte_Array_ptr(void) { - delete [] (this->release()); - } -}; - /* This test produces the following output (RLECompressor) ******** TEST RLE Compressor ************ @@ -348,7 +340,7 @@ static int test128_compressor(const ::Compression::Compressor_var &compressor) ACE_TEXT("ERROR: nil Compressor.\n")),-1); } - ACE_Byte_Array_ptr buff_128(new ACE_Byte[BUFF_128_SIZE]); + std::unique_ptr<ACE_Byte[]> buff_128(new ACE_Byte[BUFF_128_SIZE]); ACE_OS::memset(buff_128.get(), 0, BUFF_128_SIZE); // Set Buffer to zero. @@ -411,7 +403,7 @@ static int test129A_compressor(const ::Compression::Compressor_var &compressor) ACE_TEXT("ERROR: nil Compressor.\n")),-1); } - const ACE_Byte_Array_ptr buff_129(new ACE_Byte[BUFF_129_SIZE]); + const std::unique_ptr<ACE_Byte[]> buff_129(new ACE_Byte[BUFF_129_SIZE]); ACE_OS::memset(buff_129.get(), 0, BUFF_129_SIZE); // Set Buffer to zero. @@ -474,7 +466,7 @@ static int test129B_compressor(const ::Compression::Compressor_var &compressor) ACE_TEXT("ERROR: nil Compressor.\n")),-1); } - const ACE_Byte_Array_ptr buff_129(new ACE_Byte[BUFF_129_SIZE]); + const std::unique_ptr<ACE_Byte[]> buff_129(new ACE_Byte[BUFF_129_SIZE]); ACE_OS::memset(buff_129.get(), 0, BUFF_129_SIZE); // Set Buffer to zero. |