diff --git a/tool/speed.cc b/tool/speed.cc index dbaaf465..41a61419 100644 --- a/tool/speed.cc +++ b/tool/speed.cc @@ -166,13 +166,6 @@ static bool SpeedRSA(const std::string& key_name, RSA *key) { return true; } -template -struct free_functor { - void operator()(T* ptr) { - free(ptr); - } -}; - static uint8_t *align(uint8_t *in, unsigned alignment) { return reinterpret_cast( (reinterpret_cast(in) + alignment) & @@ -192,10 +185,8 @@ static bool SpeedAEADChunk(const EVP_AEAD *aead, const std::string &name, memset(key.get(), 0, key_len); std::unique_ptr nonce(new uint8_t[nonce_len]); memset(nonce.get(), 0, nonce_len); - std::unique_ptr> in_storage( - new uint8_t[chunk_len + kAlignment]); - std::unique_ptr> out_storage( - new uint8_t[chunk_len + overhead_len + kAlignment]); + std::unique_ptr in_storage(new uint8_t[chunk_len + kAlignment]); + std::unique_ptr out_storage(new uint8_t[chunk_len + overhead_len + kAlignment]); std::unique_ptr ad(new uint8_t[ad_len]); memset(ad.get(), 0, ad_len);