@@ -54,7 +54,7 @@ class CBloomFilter
5454 unsigned int Hash (unsigned int nHashNum, const std::vector<unsigned char >& vDataToHash) const ;
5555
5656 // Private constructor for CRollingBloomFilter, no restrictions on size
57- CBloomFilter (unsigned int nElements, double nFPRate, unsigned int nTweak);
57+ CBloomFilter (const unsigned int nElements, const double nFPRate, const unsigned int nTweak);
5858 friend class CRollingBloomFilter ;
5959
6060public:
@@ -67,7 +67,7 @@ class CBloomFilter
6767 * It should generally always be a random value (and is largely only exposed for unit testing)
6868 * nFlags should be one of the BLOOM_UPDATE_* enums (not _MASK)
6969 */
70- CBloomFilter (unsigned int nElements, double nFPRate, unsigned int nTweak, unsigned char nFlagsIn);
70+ CBloomFilter (const unsigned int nElements, const double nFPRate, const unsigned int nTweak, unsigned char nFlagsIn);
7171 CBloomFilter () : isFull(true ), isEmpty(false ), nHashFuncs(0 ), nTweak(0 ), nFlags(0 ) {}
7272
7373 ADD_SERIALIZE_METHODS;
@@ -89,7 +89,7 @@ class CBloomFilter
8989 bool contains (const uint256& hash) const ;
9090
9191 void clear ();
92- void reset (unsigned int nNewTweak);
92+ void reset (const unsigned int nNewTweak);
9393
9494 // ! True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
9595 // ! (catch a filter which was just deserialized which was too big)
@@ -122,7 +122,7 @@ class CRollingBloomFilter
122122 // A random bloom filter calls GetRand() at creation time.
123123 // Don't create global CRollingBloomFilter objects, as they may be
124124 // constructed before the randomizer is properly initialized.
125- CRollingBloomFilter (unsigned int nElements, double nFPRate);
125+ CRollingBloomFilter (const unsigned int nElements, const double nFPRate);
126126
127127 void insert (const std::vector<unsigned char >& vKey);
128128 void insert (const uint256& hash);
0 commit comments