aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.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/txdb.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/txdb.h')
-rw-r--r--src/txdb.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/txdb.h b/src/txdb.h
index d1cd5a4250..c254ba91c8 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -110,10 +110,10 @@ class CBlockTreeDB : public CDBWrapper
{
public:
explicit CBlockTreeDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);
-private:
- CBlockTreeDB(const CBlockTreeDB&);
- void operator=(const CBlockTreeDB&);
-public:
+
+ CBlockTreeDB(const CBlockTreeDB&) = delete;
+ CBlockTreeDB& operator=(const CBlockTreeDB&) = delete;
+
bool WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo);
bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo);
bool ReadLastBlockFile(int &nFile);