Add files via upload

This commit is contained in:
Christian Bender 2017-12-25 17:19:18 +01:00 committed by GitHub
parent c26124199f
commit 1f82f4e2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -43,12 +43,6 @@ int get_hash(char s[])
hash_code = s[counter] + (hash_code << 6) + (hash_code << 16) - hash_code;
}
/*
make sure hash_code is always positive.
because we want uses it as index
*/
hash_code = (hash_code < 0) ? hash_code * -1 : hash_code;
/* % modulo is for fitting the index in array. */
return hash_code % MAXELEMENTS;
}