diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-05-08 17:18:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-08 17:18:46 +0200 |
commit | 61380d0a070a4a691e820e18b25e9dd8fb420306 (patch) | |
tree | a786b6ba0f9e831fecfb75de2a5c3d097a24a962 /compiler/ccgutils.nim | |
parent | 8180d443b9938f135dd280bcd5e1727766cd7468 (diff) | |
parent | cc28eef38e601171644ffe1a2775744eaaca8123 (diff) | |
download | Nim-61380d0a070a4a691e820e18b25e9dd8fb420306.tar.gz |
Small cleanup (#11185)
* Remove mStaticTy and mTypeTy * Replace countup(x, y-1) with x ..< y * Replace countup(x, y) with x .. y
Diffstat (limited to 'compiler/ccgutils.nim')
-rw-r--r-- | compiler/ccgutils.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ccgutils.nim b/compiler/ccgutils.nim index 6d2f33f2d..c608a8cb0 100644 --- a/compiler/ccgutils.nim +++ b/compiler/ccgutils.nim @@ -33,7 +33,7 @@ proc hashString*(conf: ConfigRef; s: string): BiggestInt = # we have to use the same bitwidth # as the target CPU var b = 0'i64 - for i in countup(0, len(s) - 1): + for i in 0 ..< len(s): b = b +% ord(s[i]) b = b +% `shl`(b, 10) b = b xor `shr`(b, 6) @@ -43,7 +43,7 @@ proc hashString*(conf: ConfigRef; s: string): BiggestInt = result = b else: var a = 0'i32 - for i in countup(0, len(s) - 1): + for i in 0 ..< len(s): a = a +% ord(s[i]).int32 a = a +% `shl`(a, 10'i32) a = a xor `shr`(a, 6'i32) |