parent
8407a57499
commit
afbcd1b330
34 changed files with 530 additions and 314 deletions
|
|
@ -122,7 +122,7 @@ proc hash*(x: int): Hash {.inline.} =
|
|||
|
||||
proc hash*(x: int64): Hash {.inline.} =
|
||||
## Efficient hashing of `int64` integers.
|
||||
result = toU32(x)
|
||||
result = cast[int](x)
|
||||
|
||||
proc hash*(x: uint): Hash {.inline.} =
|
||||
## Efficient hashing of unsigned integers.
|
||||
|
|
@ -130,7 +130,7 @@ proc hash*(x: uint): Hash {.inline.} =
|
|||
|
||||
proc hash*(x: uint64): Hash {.inline.} =
|
||||
## Efficient hashing of `uint64` integers.
|
||||
result = toU32(cast[int](x))
|
||||
result = cast[int](x)
|
||||
|
||||
proc hash*(x: char): Hash {.inline.} =
|
||||
## Efficient hashing of characters.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue