aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/walletdb.h
diff options
context:
space:
mode:
authorDan Raviv <dan@soundradix.com>2017-09-16 13:06:05 +0300
committerDan Raviv <dan@soundradix.com>2017-09-16 13:06:05 +0300
commit2a07f878a80003f2142d5052d015a9ac81a3a6bc (patch)
tree43e85852061f076a5a247cbb2eea8a8c59c73ce8 /src/wallet/walletdb.h
parente278f86c536921032e8288625dc5f3af610f2ec8 (diff)
downloadbitcoin-2a07f878a80003f2142d5052d015a9ac81a3a6bc.tar.xz
Refactor: Modernize disallowed copy constructors/assignment
Use C++11's better capability of expressing an interface of a non-copyable class by publicly deleting its copy ctor and assignment operator instead of just declaring them private.
Diffstat (limited to 'src/wallet/walletdb.h')
-rw-r--r--src/wallet/walletdb.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index 4f8ea185d5..3a146179af 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -167,6 +167,8 @@ public:
m_dbw(dbw)
{
}
+ CWalletDB(const CWalletDB&) = delete;
+ CWalletDB& operator=(const CWalletDB&) = delete;
bool WriteName(const std::string& strAddress, const std::string& strName);
bool EraseName(const std::string& strAddress);
@@ -244,9 +246,6 @@ public:
private:
CDB batch;
CWalletDBWrapper& m_dbw;
-
- CWalletDB(const CWalletDB&);
- void operator=(const CWalletDB&);
};
//! Compacts BDB state so that wallet.dat is self-contained (if there are changes)