Skip to content

Commit 6a5303d

Browse files
committed
Move the hash round calculation function to hash_rounds_t.
1 parent 2a9a2e8 commit 6a5303d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BloomFilter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef unsigned int hash_t;
3030

3131
static void checkArchitecture();
3232

33-
static size_t calculateHashRounds(size_t size, size_t maxItems);
33+
static hash_rounds_t calculateHashRounds(size_t size, size_t maxItems);
3434

3535
static hash_t djb2Hash(const string &text);
3636

@@ -71,8 +71,8 @@ static void checkArchitecture() {
7171
}
7272
}
7373

74-
static size_t calculateHashRounds(size_t size, size_t maxItems) {
75-
return (size_t) round(log(2.0) * size / maxItems);
74+
static hash_rounds_t calculateHashRounds(size_t size, size_t maxItems) {
75+
return (hash_rounds_t) round(log(2.0) * size / maxItems);
7676
}
7777

7878
void BloomFilter::add(const string &element) {

0 commit comments

Comments
 (0)