aboutsummaryrefslogtreecommitdiff
path: root/src/coins.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/coins.h
parente278f86c536921032e8288625dc5f3af610f2ec8 (diff)
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/coins.h')
-rw-r--r--src/coins.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/coins.h b/src/coins.h
index efb5ce869c..181b2fd4b9 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -214,6 +214,11 @@ protected:
public:
CCoinsViewCache(CCoinsView *baseIn);
+ /**
+ * By deleting the copy constructor, we prevent accidentally using it when one intends to create a cache on top of a base cache.
+ */
+ CCoinsViewCache(const CCoinsViewCache &) = delete;
+
// Standard CCoinsView methods
bool GetCoin(const COutPoint &outpoint, Coin &coin) const override;
bool HaveCoin(const COutPoint &outpoint) const override;
@@ -290,11 +295,6 @@ public:
private:
CCoinsMap::iterator FetchCoin(const COutPoint &outpoint) const;
-
- /**
- * By making the copy constructor private, we prevent accidentally using it when one intends to create a cache on top of a base cache.
- */
- CCoinsViewCache(const CCoinsViewCache &);
};
//! Utility function to add all of a transaction's outputs to a cache.