From aa95947ded93e7e45f222f255baf186433cc11fc Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 20 Jun 2017 21:58:56 +0200 Subject: Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class --- src/wallet/crypter.h | 10 +++++----- src/wallet/wallet.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/wallet') diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h index f1c4f57428..1dc44e424f 100644 --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -157,8 +157,8 @@ public: bool Lock(); virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret); - bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey); - bool HaveKey(const CKeyID &address) const + bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override; + bool HaveKey(const CKeyID &address) const override { { LOCK(cs_KeyStore); @@ -168,9 +168,9 @@ public: } return false; } - bool GetKey(const CKeyID &address, CKey& keyOut) const; - bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; - void GetKeys(std::set &setAddress) const + bool GetKey(const CKeyID &address, CKey& keyOut) const override; + bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const override; + void GetKeys(std::set &setAddress) const override { if (!IsCrypted()) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 6ed955cf58..a3fd7408a0 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1153,7 +1153,7 @@ public: void ReturnKey(); bool GetReservedKey(CPubKey &pubkey, bool internal = false); void KeepKey(); - void KeepScript() { KeepKey(); } + void KeepScript() override { KeepKey(); } }; -- cgit v1.2.3