summary refs log tree commit diff stats
path: root/compiler/rodimpl.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-05-08 17:18:46 +0200
committerGitHub <noreply@github.com>2019-05-08 17:18:46 +0200
commit61380d0a070a4a691e820e18b25e9dd8fb420306 (patch)
treea786b6ba0f9e831fecfb75de2a5c3d097a24a962 /compiler/rodimpl.nim
parent8180d443b9938f135dd280bcd5e1727766cd7468 (diff)
parentcc28eef38e601171644ffe1a2775744eaaca8123 (diff)
downloadNim-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/rodimpl.nim')
-rw-r--r--compiler/rodimpl.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rodimpl.nim b/compiler/rodimpl.nim
index 147e8c3d6..7a2453caf 100644
--- a/compiler/rodimpl.nim
+++ b/compiler/rodimpl.nim
@@ -154,7 +154,7 @@ proc encodeNode(g: ModuleGraph; fInfo: TLineInfo, n: PNode,
     encodeVInt(n.sym.id, result)
     pushSym(w, n.sym)
   else:
-    for i in countup(0, sonsLen(n) - 1):
+    for i in 0 ..< sonsLen(n):
       encodeNode(g, n.info, n.sons[i], result)
   add(result, ')')
 
@@ -248,7 +248,7 @@ proc encodeType(g: ModuleGraph, t: PType, result: var string) =
     add(result, '\21')
     encodeVInt(t.typeInst.uniqueId, result)
     pushType(w, t.typeInst)
-  for i in countup(0, sonsLen(t) - 1):
+  for i in 0 ..< sonsLen(t):
     if t.sons[i] == nil:
       add(result, "^()")
     else: