aboutsummaryrefslogtreecommitdiff
path: root/src/uint256.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-08-01 12:22:41 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-08-16 16:33:25 +0200
commit64fb0ac016c7fd01c60c39af60f6431bac57f9ee (patch)
tree8d8523dd68167f9a6299dd92cc9dd5e0fd162b23 /src/uint256.h
parent22e301a3d56dc9e6878380ee92c7d19ca43119d2 (diff)
downloadbitcoin-64fb0ac016c7fd01c60c39af60f6431bac57f9ee.tar.xz
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
Diffstat (limited to 'src/uint256.h')
-rw-r--r--src/uint256.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uint256.h b/src/uint256.h
index a92ce07f11..3ed694d723 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -111,7 +111,7 @@ public:
class uint160 : public base_blob<160> {
public:
uint160() {}
- uint160(const base_blob<160>& b) : base_blob<160>(b) {}
+ explicit uint160(const base_blob<160>& b) : base_blob<160>(b) {}
explicit uint160(const std::vector<unsigned char>& vch) : base_blob<160>(vch) {}
};
@@ -123,7 +123,7 @@ public:
class uint256 : public base_blob<256> {
public:
uint256() {}
- uint256(const base_blob<256>& b) : base_blob<256>(b) {}
+ explicit uint256(const base_blob<256>& b) : base_blob<256>(b) {}
explicit uint256(const std::vector<unsigned char>& vch) : base_blob<256>(vch) {}
/** A cheap hash function that just returns 64 bits from the result, it can be