diff options
| author | ロハン ダル <[email protected]> | 2017-02-13 14:39:48 +0900 |
|---|---|---|
| committer | ロハン ダル <[email protected]> | 2017-02-13 14:39:48 +0900 |
| commit | 64aa36e20368fa16d4ff757d56dc2690ed0f48ba (patch) | |
| tree | 6d6e54064be812d02932a9e1fdee55d70b618967 /src/bloom.h | |
| parent | Merge #9736: Pre-0.14.0 hardcoded seeds update (diff) | |
| download | discoin-64aa36e20368fa16d4ff757d56dc2690ed0f48ba.tar.xz discoin-64aa36e20368fa16d4ff757d56dc2690ed0f48ba.zip | |
param variables made const
Diffstat (limited to 'src/bloom.h')
| -rw-r--r-- | src/bloom.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bloom.h b/src/bloom.h index 5ad727c33..7ca968223 100644 --- a/src/bloom.h +++ b/src/bloom.h @@ -54,7 +54,7 @@ private: unsigned int Hash(unsigned int nHashNum, const std::vector<unsigned char>& vDataToHash) const; // Private constructor for CRollingBloomFilter, no restrictions on size - CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweak); + CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweak); friend class CRollingBloomFilter; public: @@ -67,7 +67,7 @@ public: * It should generally always be a random value (and is largely only exposed for unit testing) * nFlags should be one of the BLOOM_UPDATE_* enums (not _MASK) */ - CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweak, unsigned char nFlagsIn); + CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweak, unsigned char nFlagsIn); CBloomFilter() : isFull(true), isEmpty(false), nHashFuncs(0), nTweak(0), nFlags(0) {} ADD_SERIALIZE_METHODS; @@ -89,7 +89,7 @@ public: bool contains(const uint256& hash) const; void clear(); - void reset(unsigned int nNewTweak); + void reset(const unsigned int nNewTweak); //! True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS //! (catch a filter which was just deserialized which was too big) @@ -122,7 +122,7 @@ public: // A random bloom filter calls GetRand() at creation time. // Don't create global CRollingBloomFilter objects, as they may be // constructed before the randomizer is properly initialized. - CRollingBloomFilter(unsigned int nElements, double nFPRate); + CRollingBloomFilter(const unsigned int nElements, const double nFPRate); void insert(const std::vector<unsigned char>& vKey); void insert(const uint256& hash); |