Skip to content

Commit

Permalink
Oops - need to type convert to uint8.
Browse files Browse the repository at this point in the history
  • Loading branch information
c-blake committed May 18, 2024
1 parent eecd1a2 commit cfa986e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adix/lptabz.nim
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,10 @@ proc setPolicy*[K,V,Z;z:static int](t: var LPTabz[K,V,Z,z]; numer=lpNumer,
denom=lpDenom, minFree=lpMinFree, growPow2=lpGrowPow2, rehash=lpRehash,
robinhood=lpRobinHood) {.inline.} =
## Must call `setCap` after changing certain params here (e.g. `rehash`).
t.numer = numer
t.denom = denom
t.numer = uint8(numer)
t.denom = uint8(denom)
t.minFree = max(1, minFree).uint8
t.growPow2 = growPow2
t.growPow2 = uint8(growPow2)
t.rehash = rehash
t.robin = robinhood

Expand Down

0 comments on commit cfa986e

Please sign in to comment.