mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
tidy: modernize-use-equals-default
This commit is contained in:
parent
bd5d1688b4
commit
3333bae9b2
53 changed files with 72 additions and 76 deletions
|
@ -10,6 +10,7 @@ misc-unused-using-decls,
|
|||
misc-no-recursion,
|
||||
modernize-use-default-member-init,
|
||||
modernize-use-emplace,
|
||||
modernize-use-equals-default,
|
||||
modernize-use-noexcept,
|
||||
modernize-use-nullptr,
|
||||
performance-*,
|
||||
|
|
|
@ -240,7 +240,7 @@ public:
|
|||
/** 256-bit unsigned big integer. */
|
||||
class arith_uint256 : public base_uint<256> {
|
||||
public:
|
||||
arith_uint256() {}
|
||||
arith_uint256() = default;
|
||||
arith_uint256(const base_uint<256>& b) : base_uint<256>(b) {}
|
||||
arith_uint256(uint64_t b) : base_uint<256>(b) {}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
uint256 blockhash;
|
||||
std::vector<CTransactionRef> txn;
|
||||
|
||||
BlockTransactions() {}
|
||||
BlockTransactions() = default;
|
||||
explicit BlockTransactions(const BlockTransactionsRequest& req) :
|
||||
blockhash(req.blockhash), txn(req.indexes.size()) {}
|
||||
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
/**
|
||||
* Dummy for deserialization
|
||||
*/
|
||||
CBlockHeaderAndShortTxIDs() {}
|
||||
CBlockHeaderAndShortTxIDs() = default;
|
||||
|
||||
/**
|
||||
* @param[in] nonce This should be randomly generated, and is used for the siphash secret key
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
READWRITE(VARINT(obj.nTimeLast));
|
||||
}
|
||||
|
||||
CBlockFileInfo() {}
|
||||
CBlockFileInfo() = default;
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ class CCoinsViewCursor
|
|||
{
|
||||
public:
|
||||
CCoinsViewCursor(const uint256 &hashBlockIn): hashBlock(hashBlockIn) {}
|
||||
virtual ~CCoinsViewCursor() {}
|
||||
virtual ~CCoinsViewCursor() = default;
|
||||
|
||||
virtual bool GetKey(COutPoint &key) const = 0;
|
||||
virtual bool GetValue(Coin &coin) const = 0;
|
||||
|
@ -198,7 +198,7 @@ public:
|
|||
virtual std::unique_ptr<CCoinsViewCursor> Cursor() const;
|
||||
|
||||
//! As we use CCoinsViews polymorphically, have a virtual destructor
|
||||
virtual ~CCoinsView() {}
|
||||
virtual ~CCoinsView() = default;
|
||||
|
||||
//! Estimate database size (0 if not implemented)
|
||||
virtual size_t EstimateSize() const { return 0; }
|
||||
|
|
|
@ -97,7 +97,7 @@ private:
|
|||
|
||||
public:
|
||||
/* The empty set. */
|
||||
MuHash3072() noexcept {};
|
||||
MuHash3072() noexcept = default;
|
||||
|
||||
/* A singleton with variable sized data in it. */
|
||||
explicit MuHash3072(Span<const unsigned char> in) noexcept;
|
||||
|
|
|
@ -32,7 +32,7 @@ private:
|
|||
public:
|
||||
static constexpr size_t OUTPUT_SIZE = 32;
|
||||
|
||||
SHA3_256() {}
|
||||
SHA3_256() = default;
|
||||
SHA3_256& Write(Span<const unsigned char> data);
|
||||
SHA3_256& Finalize(Span<unsigned char> output);
|
||||
SHA3_256& Reset();
|
||||
|
|
|
@ -18,7 +18,7 @@ struct FlatFilePos
|
|||
|
||||
SERIALIZE_METHODS(FlatFilePos, obj) { READWRITE(VARINT_MODE(obj.nFile, VarIntMode::NONNEGATIVE_SIGNED), VARINT(obj.nPos)); }
|
||||
|
||||
FlatFilePos() {}
|
||||
FlatFilePos() = default;
|
||||
|
||||
FlatFilePos(int nFileIn, unsigned int nPosIn) :
|
||||
nFile(nFileIn),
|
||||
|
|
|
@ -100,7 +100,7 @@ struct CompressedHeader {
|
|||
|
||||
class HeadersSyncState {
|
||||
public:
|
||||
~HeadersSyncState() {}
|
||||
~HeadersSyncState() = default;
|
||||
|
||||
enum class State {
|
||||
/** PRESYNC means the peer has not yet demonstrated their chain has
|
||||
|
|
|
@ -156,7 +156,7 @@ class HTTPClosure
|
|||
{
|
||||
public:
|
||||
virtual void operator()() = 0;
|
||||
virtual ~HTTPClosure() {}
|
||||
virtual ~HTTPClosure() = default;
|
||||
};
|
||||
|
||||
/** Event class. This can be used either as a cross-thread trigger or as a timer.
|
||||
|
|
|
@ -20,7 +20,7 @@ struct CDiskTxPos : public FlatFilePos
|
|||
CDiskTxPos(const FlatFilePos &blockIn, unsigned int nTxOffsetIn) : FlatFilePos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) {
|
||||
}
|
||||
|
||||
CDiskTxPos() {}
|
||||
CDiskTxPos() = default;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_INDEX_DISKTXPOS_H
|
||||
|
|
|
@ -123,7 +123,7 @@ struct BlockInfo {
|
|||
class Chain
|
||||
{
|
||||
public:
|
||||
virtual ~Chain() {}
|
||||
virtual ~Chain() = default;
|
||||
|
||||
//! Get current chain height, not including genesis block (returns 0 if
|
||||
//! chain only contains genesis block, nullopt if chain does not contain
|
||||
|
@ -309,7 +309,7 @@ public:
|
|||
class Notifications
|
||||
{
|
||||
public:
|
||||
virtual ~Notifications() {}
|
||||
virtual ~Notifications() = default;
|
||||
virtual void transactionAddedToMempool(const CTransactionRef& tx) {}
|
||||
virtual void transactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason) {}
|
||||
virtual void blockConnected(ChainstateRole role, const BlockInfo& block) {}
|
||||
|
@ -371,7 +371,7 @@ public:
|
|||
class ChainClient
|
||||
{
|
||||
public:
|
||||
virtual ~ChainClient() {}
|
||||
virtual ~ChainClient() = default;
|
||||
|
||||
//! Register rpcs.
|
||||
virtual void registerRpcs() = 0;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace interfaces {
|
|||
class Echo
|
||||
{
|
||||
public:
|
||||
virtual ~Echo() {}
|
||||
virtual ~Echo() = default;
|
||||
|
||||
//! Echo provided string.
|
||||
virtual std::string echo(const std::string& echo) = 0;
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace interfaces {
|
|||
class Handler
|
||||
{
|
||||
public:
|
||||
virtual ~Handler() {}
|
||||
virtual ~Handler() = default;
|
||||
|
||||
//! Disconnect the handler.
|
||||
virtual void disconnect() = 0;
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace interfaces {
|
|||
class Mining
|
||||
{
|
||||
public:
|
||||
virtual ~Mining() {}
|
||||
virtual ~Mining() = default;
|
||||
|
||||
//! If this chain is exclusively used for testing
|
||||
virtual bool isTestChain() = 0;
|
||||
|
|
|
@ -59,7 +59,7 @@ struct BlockAndHeaderTipInfo
|
|||
class ExternalSigner
|
||||
{
|
||||
public:
|
||||
virtual ~ExternalSigner() {};
|
||||
virtual ~ExternalSigner() = default;
|
||||
|
||||
//! Get signer display name
|
||||
virtual std::string getName() = 0;
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
class Node
|
||||
{
|
||||
public:
|
||||
virtual ~Node() {}
|
||||
virtual ~Node() = default;
|
||||
|
||||
//! Init logging.
|
||||
virtual void initLogging() = 0;
|
||||
|
|
|
@ -65,7 +65,7 @@ using WalletValueMap = std::map<std::string, std::string>;
|
|||
class Wallet
|
||||
{
|
||||
public:
|
||||
virtual ~Wallet() {}
|
||||
virtual ~Wallet() = default;
|
||||
|
||||
//! Encrypt wallet.
|
||||
virtual bool encryptWallet(const SecureString& wallet_passphrase) = 0;
|
||||
|
|
|
@ -163,7 +163,7 @@ public:
|
|||
static std::unique_ptr<const CChainParams> TestNet();
|
||||
|
||||
protected:
|
||||
CChainParams() {}
|
||||
CChainParams() = default;
|
||||
|
||||
Consensus::Params consensus;
|
||||
MessageStartChars pchMessageStart;
|
||||
|
|
|
@ -35,7 +35,7 @@ bool IsInterrupted(const T& result)
|
|||
class Notifications
|
||||
{
|
||||
public:
|
||||
virtual ~Notifications(){};
|
||||
virtual ~Notifications() = default;
|
||||
|
||||
[[nodiscard]] virtual InterruptResult blockTip(SynchronizationState state, CBlockIndex& index) { return {}; }
|
||||
virtual void headerTip(SynchronizationState state, int64_t height, int64_t timestamp, bool presync) {}
|
||||
|
|
|
@ -147,7 +147,7 @@ public:
|
|||
// Create from a CBlock, matching the txids in the set
|
||||
CMerkleBlock(const CBlock& block, const std::set<Txid>& txids) : CMerkleBlock{block, nullptr, &txids} {}
|
||||
|
||||
CMerkleBlock() {}
|
||||
CMerkleBlock() = default;
|
||||
|
||||
SERIALIZE_METHODS(CMerkleBlock, obj) { READWRITE(obj.header, obj.txn); }
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ public:
|
|||
/** The Transport converts one connection's sent messages to wire bytes, and received bytes back. */
|
||||
class Transport {
|
||||
public:
|
||||
virtual ~Transport() {}
|
||||
virtual ~Transport() = default;
|
||||
|
||||
struct Info
|
||||
{
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
static std::unique_ptr<PeerManager> make(CConnman& connman, AddrMan& addrman,
|
||||
BanMan* banman, ChainstateManager& chainman,
|
||||
CTxMemPool& pool, node::Warnings& warnings, Options opts);
|
||||
virtual ~PeerManager() { }
|
||||
virtual ~PeerManager() = default;
|
||||
|
||||
/**
|
||||
* Attempt to manually fetch block from a given peer. We must already have the header.
|
||||
|
|
|
@ -19,7 +19,7 @@ public:
|
|||
int64_t nCreateTime{0};
|
||||
int64_t nBanUntil{0};
|
||||
|
||||
CBanEntry() {}
|
||||
CBanEntry() = default;
|
||||
|
||||
explicit CBanEntry(int64_t nCreateTimeIn)
|
||||
: nCreateTime{nCreateTimeIn} {}
|
||||
|
|
|
@ -283,7 +283,7 @@ private:
|
|||
{
|
||||
unsigned int blockHeight{0};
|
||||
unsigned int bucketIndex{0};
|
||||
TxStatsInfo() {}
|
||||
TxStatsInfo() = default;
|
||||
};
|
||||
|
||||
// map of txids to information about that transaction
|
||||
|
|
|
@ -242,7 +242,7 @@ public:
|
|||
fill(item_ptr(0), first, last);
|
||||
}
|
||||
|
||||
prevector() {}
|
||||
prevector() = default;
|
||||
|
||||
explicit prevector(size_type n) {
|
||||
resize(n);
|
||||
|
|
|
@ -133,7 +133,7 @@ struct CBlockLocator
|
|||
|
||||
std::vector<uint256> vHave;
|
||||
|
||||
CBlockLocator() {}
|
||||
CBlockLocator() = default;
|
||||
|
||||
explicit CBlockLocator(std::vector<uint256>&& have) : vHave(std::move(have)) {}
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ struct PSBTInput
|
|||
void FillSignatureData(SignatureData& sigdata) const;
|
||||
void FromSignatureData(const SignatureData& sigdata);
|
||||
void Merge(const PSBTInput& input);
|
||||
PSBTInput() {}
|
||||
PSBTInput() = default;
|
||||
|
||||
template <typename Stream>
|
||||
inline void Serialize(Stream& s) const {
|
||||
|
@ -726,7 +726,7 @@ struct PSBTOutput
|
|||
void FillSignatureData(SignatureData& sigdata) const;
|
||||
void FromSignatureData(const SignatureData& sigdata);
|
||||
void Merge(const PSBTOutput& output);
|
||||
PSBTOutput() {}
|
||||
PSBTOutput() = default;
|
||||
|
||||
template <typename Stream>
|
||||
inline void Serialize(Stream& s) const {
|
||||
|
@ -967,7 +967,7 @@ struct PartiallySignedTransaction
|
|||
[[nodiscard]] bool Merge(const PartiallySignedTransaction& psbt);
|
||||
bool AddInput(const CTxIn& txin, PSBTInput& psbtin);
|
||||
bool AddOutput(const CTxOut& txout, const PSBTOutput& psbtout);
|
||||
PartiallySignedTransaction() {}
|
||||
PartiallySignedTransaction() = default;
|
||||
explicit PartiallySignedTransaction(const CMutableTransaction& tx);
|
||||
/**
|
||||
* Finds the UTXO for a given input index
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
static QString toHTML(interfaces::Node& node, interfaces::Wallet& wallet, TransactionRecord* rec, BitcoinUnit unit);
|
||||
|
||||
private:
|
||||
TransactionDesc() {}
|
||||
TransactionDesc() = default;
|
||||
|
||||
static QString FormatTxStatus(const interfaces::WalletTxStatus& status, bool inMempool);
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ bool RPCIsInWarmup(std::string *outStatus);
|
|||
class RPCTimerBase
|
||||
{
|
||||
public:
|
||||
virtual ~RPCTimerBase() {}
|
||||
virtual ~RPCTimerBase() = default;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
class RPCTimerInterface
|
||||
{
|
||||
public:
|
||||
virtual ~RPCTimerInterface() {}
|
||||
virtual ~RPCTimerInterface() = default;
|
||||
/** Implementation name */
|
||||
virtual const char *Name() = 0;
|
||||
/** Factory function for timers.
|
||||
|
|
|
@ -265,7 +265,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual ~BaseSignatureChecker() {}
|
||||
virtual ~BaseSignatureChecker() = default;
|
||||
};
|
||||
|
||||
/** Enum to specify what *TransactionSignatureChecker's behavior should be
|
||||
|
|
|
@ -305,7 +305,7 @@ struct InputStack {
|
|||
//! Data elements.
|
||||
std::vector<std::vector<unsigned char>> stack;
|
||||
//! Construct an empty stack (valid).
|
||||
InputStack() {}
|
||||
InputStack() = default;
|
||||
//! Construct a valid single-element stack (with an element up to 75 bytes).
|
||||
InputStack(std::vector<unsigned char> in) : size(in.size() + 1), stack(Vector(std::move(in))) {}
|
||||
//! Change availability
|
||||
|
|
|
@ -430,7 +430,7 @@ protected:
|
|||
return *this;
|
||||
}
|
||||
public:
|
||||
CScript() { }
|
||||
CScript() = default;
|
||||
CScript(const_iterator pbegin, const_iterator pend) : CScriptBase(pbegin, pend) { }
|
||||
CScript(std::vector<unsigned char>::const_iterator pbegin, std::vector<unsigned char>::const_iterator pend) : CScriptBase(pbegin, pend) { }
|
||||
CScript(const unsigned char* pbegin, const unsigned char* pend) : CScriptBase(pbegin, pend) { }
|
||||
|
@ -569,7 +569,7 @@ struct CScriptWitness
|
|||
std::vector<std::vector<unsigned char> > stack;
|
||||
|
||||
// Some compilers complain without a default constructor
|
||||
CScriptWitness() { }
|
||||
CScriptWitness() = default;
|
||||
|
||||
bool IsNull() const { return stack.empty(); }
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ struct CMutableTransaction;
|
|||
/** Interface for signature creators. */
|
||||
class BaseSignatureCreator {
|
||||
public:
|
||||
virtual ~BaseSignatureCreator() {}
|
||||
virtual ~BaseSignatureCreator() = default;
|
||||
virtual const BaseSignatureChecker& Checker() const =0;
|
||||
|
||||
/** Create a singular (non-script) signature. */
|
||||
|
@ -89,7 +89,7 @@ struct SignatureData {
|
|||
std::map<std::vector<uint8_t>, std::vector<uint8_t>> ripemd160_preimages; ///< Mapping from a RIPEMD160 hash to its preimage provided to solve a Script
|
||||
std::map<std::vector<uint8_t>, std::vector<uint8_t>> hash160_preimages; ///< Mapping from a HASH160 hash to its preimage provided to solve a Script
|
||||
|
||||
SignatureData() {}
|
||||
SignatureData() = default;
|
||||
explicit SignatureData(const CScript& script) : scriptSig(script) {}
|
||||
void MergeSignatureData(SignatureData sigdata);
|
||||
};
|
||||
|
|
|
@ -150,7 +150,7 @@ std::optional<std::vector<std::tuple<int, std::vector<unsigned char>, int>>> Inf
|
|||
class SigningProvider
|
||||
{
|
||||
public:
|
||||
virtual ~SigningProvider() {}
|
||||
virtual ~SigningProvider() = default;
|
||||
virtual bool GetCScript(const CScriptID &scriptid, CScript& script) const { return false; }
|
||||
virtual bool HaveCScript(const CScriptID &scriptid) const { return false; }
|
||||
virtual bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const { return false; }
|
||||
|
|
|
@ -1061,7 +1061,7 @@ protected:
|
|||
size_t nSize{0};
|
||||
|
||||
public:
|
||||
SizeComputer() {}
|
||||
SizeComputer() = default;
|
||||
|
||||
void write(Span<const std::byte> src)
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
typedef vector_type::const_iterator const_iterator;
|
||||
typedef vector_type::reverse_iterator reverse_iterator;
|
||||
|
||||
explicit DataStream() {}
|
||||
explicit DataStream() = default;
|
||||
explicit DataStream(Span<const uint8_t> sp) : DataStream{AsBytes(sp)} {}
|
||||
explicit DataStream(Span<const value_type> sp) : vch(sp.data(), sp.data() + sp.size()) {}
|
||||
|
||||
|
|
|
@ -46,9 +46,7 @@ Arena::Arena(void *base_in, size_t size_in, size_t alignment_in):
|
|||
chunks_free_end.emplace(static_cast<char*>(base) + size_in, it);
|
||||
}
|
||||
|
||||
Arena::~Arena()
|
||||
{
|
||||
}
|
||||
Arena::~Arena() = default;
|
||||
|
||||
void* Arena::alloc(size_t size)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
class LockedPageAllocator
|
||||
{
|
||||
public:
|
||||
virtual ~LockedPageAllocator() {}
|
||||
virtual ~LockedPageAllocator() = default;
|
||||
/** Allocate and lock memory pages.
|
||||
* If len is not a multiple of the system page size, it is rounded up.
|
||||
* Returns nullptr in case of allocation failure.
|
||||
|
|
|
@ -206,7 +206,7 @@ public:
|
|||
|
||||
protected:
|
||||
// needed for reverse_lock
|
||||
UniqueLock() { }
|
||||
UniqueLock() = default;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
|
|
@ -71,7 +71,7 @@ class SCOPED_LOCKABLE StdLockGuard : public std::lock_guard<StdMutex>
|
|||
{
|
||||
public:
|
||||
explicit StdLockGuard(StdMutex& cs) EXCLUSIVE_LOCK_FUNCTION(cs) : std::lock_guard<StdMutex>(cs) {}
|
||||
~StdLockGuard() UNLOCK_FUNCTION() {}
|
||||
~StdLockGuard() UNLOCK_FUNCTION() = default;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_THREADSAFETY_H
|
||||
|
|
|
@ -507,8 +507,7 @@ namespace detail {
|
|||
class FormatArg
|
||||
{
|
||||
public:
|
||||
FormatArg()
|
||||
{ }
|
||||
FormatArg() = default;
|
||||
|
||||
template<typename T>
|
||||
explicit FormatArg(const T& value)
|
||||
|
|
|
@ -678,7 +678,7 @@ struct error
|
|||
class Buffer
|
||||
{
|
||||
public:
|
||||
Buffer() {}
|
||||
Buffer() = default;
|
||||
explicit Buffer(size_t cap) { buf.resize(cap); }
|
||||
void add_cap(size_t cap) { buf.resize(cap); }
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace util {
|
|||
class TaskRunnerInterface
|
||||
{
|
||||
public:
|
||||
virtual ~TaskRunnerInterface() {}
|
||||
virtual ~TaskRunnerInterface() = default;
|
||||
|
||||
/**
|
||||
* The callback can either be queued for later/asynchronous/threaded
|
||||
|
|
|
@ -95,7 +95,7 @@ public:
|
|||
ValidationSignals::ValidationSignals(std::unique_ptr<util::TaskRunnerInterface> task_runner)
|
||||
: m_internals{std::make_unique<ValidationSignalsImpl>(std::move(task_runner))} {}
|
||||
|
||||
ValidationSignals::~ValidationSignals() {}
|
||||
ValidationSignals::~ValidationSignals() = default;
|
||||
|
||||
void ValidationSignals::FlushBackgroundCallbacks()
|
||||
{
|
||||
|
|
|
@ -255,7 +255,7 @@ struct OutputGroup
|
|||
/** Total weight of the UTXOs in this group. */
|
||||
int m_weight{0};
|
||||
|
||||
OutputGroup() {}
|
||||
OutputGroup() = default;
|
||||
OutputGroup(const CoinSelectionParams& params) :
|
||||
m_long_term_feerate(params.m_long_term_feerate),
|
||||
m_subtract_fee_outputs(params.m_subtract_fee_outputs)
|
||||
|
|
|
@ -30,8 +30,8 @@ bool operator<(Span<const std::byte> a, BytePrefix b);
|
|||
class DatabaseCursor
|
||||
{
|
||||
public:
|
||||
explicit DatabaseCursor() {}
|
||||
virtual ~DatabaseCursor() {}
|
||||
explicit DatabaseCursor() = default;
|
||||
virtual ~DatabaseCursor() = default;
|
||||
|
||||
DatabaseCursor(const DatabaseCursor&) = delete;
|
||||
DatabaseCursor& operator=(const DatabaseCursor&) = delete;
|
||||
|
@ -56,8 +56,8 @@ private:
|
|||
virtual bool HasKey(DataStream&& key) = 0;
|
||||
|
||||
public:
|
||||
explicit DatabaseBatch() {}
|
||||
virtual ~DatabaseBatch() {}
|
||||
explicit DatabaseBatch() = default;
|
||||
virtual ~DatabaseBatch() = default;
|
||||
|
||||
DatabaseBatch(const DatabaseBatch&) = delete;
|
||||
DatabaseBatch& operator=(const DatabaseBatch&) = delete;
|
||||
|
@ -131,7 +131,7 @@ class WalletDatabase
|
|||
public:
|
||||
/** Create dummy DB handle */
|
||||
WalletDatabase() : nUpdateCounter(0) {}
|
||||
virtual ~WalletDatabase() {};
|
||||
virtual ~WalletDatabase() = default;
|
||||
|
||||
/** Open the database if it is not already opened. */
|
||||
virtual void Open() = 0;
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
{
|
||||
if (open) Open();
|
||||
}
|
||||
~BerkeleyRODatabase(){};
|
||||
~BerkeleyRODatabase() = default;
|
||||
|
||||
BerkeleyROData m_records;
|
||||
|
||||
|
@ -81,7 +81,7 @@ private:
|
|||
|
||||
public:
|
||||
explicit BerkeleyROCursor(const BerkeleyRODatabase& database, Span<const std::byte> prefix = {});
|
||||
~BerkeleyROCursor() {}
|
||||
~BerkeleyROCursor() = default;
|
||||
|
||||
Status Next(DataStream& key, DataStream& value) override;
|
||||
};
|
||||
|
@ -102,7 +102,7 @@ private:
|
|||
|
||||
public:
|
||||
explicit BerkeleyROBatch(const BerkeleyRODatabase& database) : m_database(database) {}
|
||||
~BerkeleyROBatch() {}
|
||||
~BerkeleyROBatch() = default;
|
||||
|
||||
BerkeleyROBatch(const BerkeleyROBatch&) = delete;
|
||||
BerkeleyROBatch& operator=(const BerkeleyROBatch&) = delete;
|
||||
|
|
|
@ -178,7 +178,7 @@ protected:
|
|||
|
||||
public:
|
||||
explicit ScriptPubKeyMan(WalletStorage& storage) : m_storage(storage) {}
|
||||
virtual ~ScriptPubKeyMan() {};
|
||||
virtual ~ScriptPubKeyMan() = default;
|
||||
virtual util::Result<CTxDestination> GetNewDestination(const OutputType type) { return util::Error{Untranslated("Not supported")}; }
|
||||
virtual isminetype IsMine(const CScript& script) const { return ISMINE_NO; }
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
std::vector<std::byte> m_prefix_range_start;
|
||||
std::vector<std::byte> m_prefix_range_end;
|
||||
|
||||
explicit SQLiteCursor() {}
|
||||
explicit SQLiteCursor() = default;
|
||||
explicit SQLiteCursor(std::vector<std::byte> start_range, std::vector<std::byte> end_range)
|
||||
: m_prefix_range_start(std::move(start_range)),
|
||||
m_prefix_range_end(std::move(end_range))
|
||||
|
@ -41,7 +41,7 @@ public:
|
|||
class SQliteExecHandler
|
||||
{
|
||||
public:
|
||||
virtual ~SQliteExecHandler() {}
|
||||
virtual ~SQliteExecHandler() = default;
|
||||
virtual int Exec(SQLiteDatabase& database, const std::string& statement);
|
||||
};
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
explicit MockableCursor(const MockableData& records, bool pass) : m_cursor(records.begin()), m_cursor_end(records.end()), m_pass(pass) {}
|
||||
MockableCursor(const MockableData& records, bool pass, Span<const std::byte> prefix);
|
||||
~MockableCursor() {}
|
||||
~MockableCursor() = default;
|
||||
|
||||
Status Next(DataStream& key, DataStream& value) override;
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ private:
|
|||
|
||||
public:
|
||||
explicit MockableBatch(MockableData& records, bool pass) : m_records(records), m_pass(pass) {}
|
||||
~MockableBatch() {}
|
||||
~MockableBatch() = default;
|
||||
|
||||
void Flush() override {}
|
||||
void Close() override {}
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
bool m_pass{true};
|
||||
|
||||
MockableDatabase(MockableData records = {}) : WalletDatabase(), m_records(records) {}
|
||||
~MockableDatabase() {};
|
||||
~MockableDatabase() = default;
|
||||
|
||||
void Open() override {}
|
||||
void AddRef() override {}
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
SER_READ(obj, obj.DeserializeDescriptor(descriptor_str));
|
||||
}
|
||||
|
||||
WalletDescriptor() {}
|
||||
WalletDescriptor() = default;
|
||||
WalletDescriptor(std::shared_ptr<Descriptor> descriptor, uint64_t creation_time, int32_t range_start, int32_t range_end, int32_t next_index) : descriptor(descriptor), id(DescriptorID(*descriptor)), creation_time(creation_time), range_start(range_start), range_end(range_end), next_index(next_index) { }
|
||||
};
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
/** Add wallets that should be opened to list of chain clients. */
|
||||
virtual void Construct(node::NodeContext& node) const = 0;
|
||||
|
||||
virtual ~WalletInitInterface() {}
|
||||
virtual ~WalletInitInterface() = default;
|
||||
};
|
||||
|
||||
extern const WalletInitInterface& g_wallet_init_interface;
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
CZMQNotificationInterface::CZMQNotificationInterface()
|
||||
{
|
||||
}
|
||||
CZMQNotificationInterface::CZMQNotificationInterface() = default;
|
||||
|
||||
CZMQNotificationInterface::~CZMQNotificationInterface()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue