Skip to content

Commit db3cb5c

Browse files
committed
Merge #13948: trivial: Removes unsed CBloomFilter constructor.
265bd50 Removes unsed `CBloomFilter` constructor. (251) Pull request description: This pull request removes the `CBloomFilter::CBloomFilter(const unsigned int, const double, const unsigned int)` constructor, which became obsolete with 086ee67. Tree-SHA512: 46742f178e219661e82609a9bf6b644ebc58ab3efc2d1865c5562980e84f16a5fa286be9813738196ad7a27e639dee926062538eb44cadd67ab87ad5e9a266ba
2 parents 2be8206 + 265bd50 commit db3cb5c

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/bloom.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,6 @@ CBloomFilter::CBloomFilter(const unsigned int nElements, const double nFPRate, c
3838
{
3939
}
4040

41-
// Private constructor used by CRollingBloomFilter
42-
CBloomFilter::CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweakIn) :
43-
vData((unsigned int)(-1 / LN2SQUARED * nElements * log(nFPRate)) / 8),
44-
isFull(false),
45-
isEmpty(true),
46-
nHashFuncs((unsigned int)(vData.size() * 8 / nElements * LN2)),
47-
nTweak(nTweakIn),
48-
nFlags(BLOOM_UPDATE_NONE)
49-
{
50-
}
51-
5241
inline unsigned int CBloomFilter::Hash(unsigned int nHashNum, const std::vector<unsigned char>& vDataToHash) const
5342
{
5443
// 0xFBA4C795 chosen as it guarantees a reasonable bit difference between nHashNum values.

src/bloom.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ class CBloomFilter
5353

5454
unsigned int Hash(unsigned int nHashNum, const std::vector<unsigned char>& vDataToHash) const;
5555

56-
// Private constructor for CRollingBloomFilter, no restrictions on size
57-
CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweak);
58-
friend class CRollingBloomFilter;
59-
6056
public:
6157
/**
6258
* Creates a new bloom filter which will provide the given fp rate when filled with the given number of elements

0 commit comments

Comments
 (0)