mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
tests: Simplify code by removing unwarranted use of unique_ptr:s
This commit is contained in:
@@ -15,12 +15,11 @@
|
||||
#include <version.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
void initialize()
|
||||
{
|
||||
const static auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
SelectParams(CBaseChainParams::REGTEST);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
void initialize()
|
||||
{
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
SelectParams(CBaseChainParams::REGTEST);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
void initialize()
|
||||
{
|
||||
// Fuzzers using pubkey must hold an ECCVerifyHandle.
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
void initialize()
|
||||
{
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
}
|
||||
|
||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
void initialize()
|
||||
{
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
SelectParams(CBaseChainParams::REGTEST);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
void initialize()
|
||||
{
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
}
|
||||
|
||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
void initialize()
|
||||
{
|
||||
// Fuzzers using pubkey must hold an ECCVerifyHandle.
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
|
||||
SelectParams(CBaseChainParams::REGTEST);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ static bool IsValidFlagCombination(unsigned flags);
|
||||
|
||||
void initialize()
|
||||
{
|
||||
static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
|
||||
static const ECCVerifyHandle verify_handle;
|
||||
}
|
||||
|
||||
void test_one_input(const std::vector<uint8_t>& buffer)
|
||||
|
||||
Reference in New Issue
Block a user