Skip to content

Commit 94c9015

Browse files
committed
Merge #11385: Remove some unused functions and methods
46c9043 Remove some unused functions and methods (Pieter Wuille) Pull request description: In the case of CKey's destructor, it seems to have been an oversight in #8753 not to delete it. At this point, it results in the move constructors/assignment operators for CKey being deleted, which may have a performance impact (requiring a pool allocation/copy/free, rather than just handing over the pointer from one CKey to another) Tree-SHA512: 89715bafe3e0bea2c46fc92bc6a1010360a3fee2719f97b81ca379581003409b0876b50f992208a3c13c7f5b77f1866db09954e7d102f6a452fe5d7aed2044a1
2 parents 390771b + 46c9043 commit 94c9015

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

src/hash.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,6 @@ inline uint256 Hash(const T1 p1begin, const T1 p1end,
8888
return result;
8989
}
9090

91-
/** Compute the 256-bit hash of the concatenation of three objects. */
92-
template<typename T1, typename T2, typename T3>
93-
inline uint256 Hash(const T1 p1begin, const T1 p1end,
94-
const T2 p2begin, const T2 p2end,
95-
const T3 p3begin, const T3 p3end) {
96-
static const unsigned char pblank[1] = {};
97-
uint256 result;
98-
CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0]))
99-
.Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0]))
100-
.Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0]))
101-
.Finalize((unsigned char*)&result);
102-
return result;
103-
}
104-
10591
/** Compute the 160-bit hash an object. */
10692
template<typename T1>
10793
inline uint160 Hash160(const T1 pbegin, const T1 pend)

src/key.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ class CKey
5656
keydata.resize(32);
5757
}
5858

59-
//! Destructor (again necessary because of memlocking).
60-
~CKey()
61-
{
62-
}
63-
6459
friend bool operator==(const CKey& a, const CKey& b)
6560
{
6661
return a.fCompressed == b.fCompressed &&

src/uint256.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ class base_blob
111111
class uint160 : public base_blob<160> {
112112
public:
113113
uint160() {}
114-
explicit uint160(const base_blob<160>& b) : base_blob<160>(b) {}
115114
explicit uint160(const std::vector<unsigned char>& vch) : base_blob<160>(vch) {}
116115
};
117116

@@ -123,7 +122,6 @@ class uint160 : public base_blob<160> {
123122
class uint256 : public base_blob<256> {
124123
public:
125124
uint256() {}
126-
explicit uint256(const base_blob<256>& b) : base_blob<256>(b) {}
127125
explicit uint256(const std::vector<unsigned char>& vch) : base_blob<256>(vch) {}
128126

129127
/** A cheap hash function that just returns 64 bits from the result, it can be

0 commit comments

Comments
 (0)