fixes #21393 and misc style changes (#21419)

* fixes #21393 and misc style changes

* progress

---------

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
Andreas Rumpf 2023-02-24 09:02:15 +01:00 • committed by GitHub
commit 8a19ac2070
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 70 additions and 61 deletions

View file

@ -33,7 +33,7 @@ proc eqStrings(a, b: string): bool {.inline, compilerproc.} =
proc hashString(s: string): int {.compilerproc.} =
# the compiler needs exactly the same hash function!
# this used to be used for efficient generation of string case statements
var h : uint = 0
var h = 0'u
for i in 0..len(s)-1:
h = h + uint(s[i])
h = h + h shl 10