remove whitespace

This commit is contained in:
Andrew Meadows 2016-07-12 17:26:17 -07:00
parent e086792eac
commit af1be8ccd4
2 changed files with 6 additions and 6 deletions

View file

@ -12,7 +12,7 @@
#include "DoubleHashKey.h" #include "DoubleHashKey.h"
const uint32_t NUM_PRIMES = 64; const uint32_t NUM_PRIMES = 64;
const uint32_t PRIMES[] = { const uint32_t PRIMES[] = {
4194301U, 4194287U, 4194277U, 4194271U, 4194247U, 4194217U, 4194199U, 4194191U, 4194301U, 4194287U, 4194277U, 4194271U, 4194247U, 4194217U, 4194199U, 4194191U,
4194187U, 4194181U, 4194173U, 4194167U, 4194143U, 4194137U, 4194131U, 4194107U, 4194187U, 4194181U, 4194173U, 4194167U, 4194143U, 4194137U, 4194131U, 4194107U,
4194103U, 4194023U, 4194011U, 4194007U, 4193977U, 4193971U, 4193963U, 4193957U, 4194103U, 4194023U, 4194011U, 4194007U, 4193977U, 4193971U, 4193963U, 4193957U,
@ -27,8 +27,8 @@ uint32_t DoubleHashKey::hashFunction(uint32_t value, uint32_t primeIndex) {
uint32_t hash = PRIMES[primeIndex % NUM_PRIMES] * (value + 1U); uint32_t hash = PRIMES[primeIndex % NUM_PRIMES] * (value + 1U);
hash += ~(hash << 15); hash += ~(hash << 15);
hash ^= (hash >> 10); hash ^= (hash >> 10);
hash += (hash << 3); hash += (hash << 3);
hash ^= (hash >> 6); hash ^= (hash >> 6);
hash += ~(hash << 11); hash += ~(hash << 11);
return hash ^ (hash >> 16); return hash ^ (hash >> 16);
} }

View file

@ -22,9 +22,9 @@ public:
DoubleHashKey() : _hash(0), _hash2(0) { } DoubleHashKey() : _hash(0), _hash2(0) { }
DoubleHashKey(uint32_t value, uint32_t primeIndex = 0) : DoubleHashKey(uint32_t value, uint32_t primeIndex = 0) :
_hash(hashFunction(value, primeIndex)), _hash(hashFunction(value, primeIndex)),
_hash2(hashFunction2(value)) { _hash2(hashFunction2(value)) {
} }
void clear() { _hash = 0; _hash2 = 0; } void clear() { _hash = 0; _hash2 = 0; }