fix(util/hash): relax pre-condition
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
f464775af6
commit
8b8881deae
1 changed files with 2 additions and 1 deletions
|
@ -23,7 +23,8 @@ inline unsigned hash(unsigned h1, unsigned h2) {
|
|||
template<typename H>
|
||||
unsigned hash(unsigned n, H h, unsigned init_value = 31) {
|
||||
unsigned a, b, c;
|
||||
lean_assert(n > 0);
|
||||
if (n == 0)
|
||||
return init_value;
|
||||
|
||||
a = b = 0x9e3779b9;
|
||||
c = 11;
|
||||
|
|
Loading…
Reference in a new issue