Removed 'startHash' parameter from hash64n().

It was always default (0) or explicitly 0.
This commit is contained in:
Ivan Skytte Jørgensen
2017-01-05 15:10:37 +01:00
parent 0e83e427be
commit 4ab06a3695
4 changed files with 5 additions and 5 deletions

@ -420,7 +420,7 @@ bool Query::setQTerms ( Words &words ) {
Synonyms syn;
int32_t sn = 0;
if ( m_queryExpansion ) sn = m_numWords;
int64_t to = hash64n("to",0LL);
int64_t to = hash64n("to");
for ( int32_t i = 0 ; i < sn ; i++ ) {
// get query word
QueryWord *qw = &m_qwords[i];

@ -97,8 +97,8 @@ uint32_t hash32n ( const char *s ) {
return h;
}
uint64_t hash64n ( const char *s, uint64_t startHash ) {
uint64_t h = startHash;
uint64_t hash64n(const char *s) {
uint64_t h = 0;
for ( register int32_t i = 0 ; s[i] ; i++ )
h ^= g_hashtab [(unsigned char)i] [(unsigned char)s[i]];
return h;

2
hash.h

@ -31,7 +31,7 @@ uint32_t hash32 ( const char *s, int32_t len,uint32_t startHash=0);
uint32_t hash32h ( uint32_t h1 , uint32_t h2 ) ;
uint64_t hash64h ( uint64_t h1 , uint64_t h2 );
uint32_t hash32Lower_a ( const char *s, int32_t len,uint32_t startHash=0);
uint64_t hash64n ( const char *s, uint64_t startHash =0LL);
uint64_t hash64n(const char *s);
uint96_t hash96 ( const char *s, int32_t slen);
// . these convert \n to \0 when hashing

@ -4864,7 +4864,7 @@ void dumpLinkdb ( const char *coll,
Url u;
u.set( url, strlen( url ), true, false );
uint32_t h32 = u.getHostHash32();
int64_t uh64 = hash64n(url,0);
int64_t uh64 = hash64n(url);
startKey = Linkdb::makeStartKey_uk ( h32 , uh64 );
endKey = Linkdb::makeEndKey_uk ( h32 , uh64 );
}