Merge #13948: trivial: Removes unsed CBloomFilter constructor.

265bd50884 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
This commit is contained in:
Wladimir J. van der Laan 2018-08-14 10:57:11 +02:00
commit db3cb5c5a6
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D
2 changed files with 0 additions and 15 deletions

View file

@ -38,17 +38,6 @@ CBloomFilter::CBloomFilter(const unsigned int nElements, const double nFPRate, c
{
}
// Private constructor used by CRollingBloomFilter
CBloomFilter::CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweakIn) :
vData((unsigned int)(-1 / LN2SQUARED * nElements * log(nFPRate)) / 8),
isFull(false),
isEmpty(true),
nHashFuncs((unsigned int)(vData.size() * 8 / nElements * LN2)),
nTweak(nTweakIn),
nFlags(BLOOM_UPDATE_NONE)
{
}
inline unsigned int CBloomFilter::Hash(unsigned int nHashNum, const std::vector<unsigned char>& vDataToHash) const
{
// 0xFBA4C795 chosen as it guarantees a reasonable bit difference between nHashNum values.

View file

@ -53,10 +53,6 @@ private:
unsigned int Hash(unsigned int nHashNum, const std::vector<unsigned char>& vDataToHash) const;
// Private constructor for CRollingBloomFilter, no restrictions on size
CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweak);
friend class CRollingBloomFilter;
public:
/**
* Creates a new bloom filter which will provide the given fp rate when filled with the given number of elements