diff options
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/compress.cpp | 9 | ||||
-rw-r--r-- | src/cli/entropy.cpp | 2 | ||||
-rw-r--r-- | src/cli/speed.cpp | 2 |
3 files changed, 4 insertions, 9 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) { diff --git a/src/cli/entropy.cpp b/src/cli/entropy.cpp index 0404afb99..472765704 100644 --- a/src/cli/entropy.cpp +++ b/src/cli/entropy.cpp @@ -63,7 +63,7 @@ class Entropy final : public Command #if defined(BOTAN_HAS_COMPRESSION) if(!sample.empty()) { - std::unique_ptr<Botan::Compression_Algorithm> comp(Botan::make_compressor("zlib")); + auto comp = Botan::Compression_Algorithm::create("zlib"); if(comp) { try diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index 6dbe82aba..5b57923eb 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -1085,7 +1085,7 @@ class Speed final : public Command size_t compressed_size = 0; #if defined(BOTAN_HAS_ZLIB) - std::unique_ptr<Botan::Compression_Algorithm> comp(Botan::make_compressor("zlib")); + auto comp = Botan::Compression_Algorithm::create("zlib"); if(comp) { |