diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-07-08 11:11:58 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-07-08 11:12:01 +0200 |
commit | 3333bae9b2a6c1ee2314d33361c93944c12001f9 (patch) | |
tree | 8c4e936cacd9df2c1290210a4642e5a587034400 /src/script | |
parent | bd5d1688b4311e21c0e0ff89a3ae02ef7d0543b8 (diff) |
tidy: modernize-use-equals-default
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/interpreter.h | 2 | ||||
-rw-r--r-- | src/script/miniscript.h | 2 | ||||
-rw-r--r-- | src/script/script.h | 4 | ||||
-rw-r--r-- | src/script/sign.h | 4 | ||||
-rw-r--r-- | src/script/signingprovider.h | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 836c2e7982..8ba0018c23 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -265,7 +265,7 @@ public: return false; } - virtual ~BaseSignatureChecker() {} + virtual ~BaseSignatureChecker() = default; }; /** Enum to specify what *TransactionSignatureChecker's behavior should be diff --git a/src/script/miniscript.h b/src/script/miniscript.h index a269709e72..97912906d1 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -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 diff --git a/src/script/script.h b/src/script/script.h index 66d63fae89..035152ee51 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -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(); } diff --git a/src/script/sign.h b/src/script/sign.h index ace2ba7856..4edd5bf326 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -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); }; diff --git a/src/script/signingprovider.h b/src/script/signingprovider.h index 3298376389..efdfd9ee56 100644 --- a/src/script/signingprovider.h +++ b/src/script/signingprovider.h @@ -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; } |