diff options
Diffstat (limited to 'src/addresstype.h')
-rw-r--r-- | src/addresstype.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/addresstype.h b/src/addresstype.h index d3422c6813..522f58fef1 100644 --- a/src/addresstype.h +++ b/src/addresstype.h @@ -13,15 +13,16 @@ #include <variant> #include <algorithm> -class CNoDestination { +class CNoDestination +{ private: CScript m_script; public: CNoDestination() = default; - CNoDestination(const CScript& script) : m_script(script) {} + explicit CNoDestination(const CScript& script) : m_script(script) {} - const CScript& GetScript() const { return m_script; } + const CScript& GetScript() const LIFETIMEBOUND { return m_script; } friend bool operator==(const CNoDestination& a, const CNoDestination& b) { return a.GetScript() == b.GetScript(); } friend bool operator<(const CNoDestination& a, const CNoDestination& b) { return a.GetScript() < b.GetScript(); } @@ -32,7 +33,7 @@ private: CPubKey m_pubkey; public: - PubKeyDestination(const CPubKey& pubkey) : m_pubkey(pubkey) {} + explicit PubKeyDestination(const CPubKey& pubkey) : m_pubkey(pubkey) {} const CPubKey& GetPubKey() const LIFETIMEBOUND { return m_pubkey; } |