mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
committed by
Andreas Rumpf
parent
8407a57499
commit
afbcd1b330
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user