aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/compress.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2021-04-03 10:46:57 -0400
committerJack Lloyd <[email protected]>2021-04-03 11:53:27 -0400
commit4864c427479f93d4716682d0fe8e38dca21431cf (patch)
tree040c73be57f461dcb350553ef691f5c79ebd0f43 /src/cli/compress.cpp
parentaa7958880bee2091a8a71bf9e1f6e6efb34581e3 (diff)
Remove use of explicit new from compression APIs
Diffstat (limited to 'src/cli/compress.cpp')
-rw-r--r--src/cli/compress.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/cli/compress.cpp b/src/cli/compress.cpp
index e62acd763..b52e15608 100644
--- a/src/cli/compress.cpp
+++ b/src/cli/compress.cpp
@@ -55,10 +55,7 @@ class Compress final : public Command
const size_t buf_size = get_arg_sz("buf-size");
const size_t comp_level = get_arg_sz("level");
- std::unique_ptr<Botan::Compression_Algorithm> compress;
-
- compress.reset(Botan::make_compressor(comp_type));
-
+ auto compress = Botan::Compression_Algorithm::create(comp_type);
if(!compress)
{
throw CLI_Error_Unsupported("Compression", comp_type);
@@ -146,9 +143,7 @@ class Decompress final : public Command
throw CLI_IO_Error("reading", in_file);
}
- std::unique_ptr<Botan::Decompression_Algorithm> decompress;
-
- decompress.reset(Botan::make_decompressor(suffix));
+ auto decompress = Botan::Decompression_Algorithm::create(suffix);
if(!decompress)
{