Skip to content

Commit

Permalink
Removes unsed CBloomFilter constructor.
Browse files Browse the repository at this point in the history
This commit removes the `CBloomFilter::CBloomFilter(const unsigned int, const double, const unsigned int)` constructor, which became obsolete with 086ee67.
  • Loading branch information
l2a5b1 committed Aug 12, 2018
1 parent 0df7a6c commit 265bd50
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
11 changes: 0 additions & 11 deletions src/bloom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions src/bloom.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ class CBloomFilter

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
Expand Down

0 comments on commit 265bd50

Please sign in to comment.