diff options
author | Clay Sweetser <clay.sweetser@gmail.com> | 2014-02-15 18:57:03 -0500 |
---|---|---|
committer | Clay Sweetser <clay.sweetser@gmail.com> | 2014-02-15 18:57:03 -0500 |
commit | ce5a494927abf66cc39cf849b9c66e2dadbe579e (patch) | |
tree | a09a0e48025c79fee103b16f19140f533b7c6847 /tests/generics/tgeneric3.nim | |
parent | f701ee086aacf3ad9d4f58c20d5924fc0c5b3bb2 (diff) | |
download | Nim-ce5a494927abf66cc39cf849b9c66e2dadbe579e.tar.gz |
Changed tests and tools to use 'discard' statements instead of 'nil' for empty blocks.
Diffstat (limited to 'tests/generics/tgeneric3.nim')
-rw-r--r-- | tests/generics/tgeneric3.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/generics/tgeneric3.nim b/tests/generics/tgeneric3.nim index 3c543ecfa..963d0ccfb 100644 --- a/tests/generics/tgeneric3.nim +++ b/tests/generics/tgeneric3.nim @@ -32,7 +32,7 @@ const proc len[T,D] (n:PNode[T,D]): Int {.inline.} = return n.Count -proc clean[T: TOrdinal|TNumber](o: var T) {.inline.} = nil +proc clean[T: TOrdinal|TNumber](o: var T) {.inline.} = discard proc clean[T: string|seq](o: var T) {.inline.} = o = nil @@ -98,7 +98,7 @@ proc DeleteItem[T,D] (n: PNode[T,D], x: Int): PNode[T,D] {.inline.} = of cLen3 : setLen(n.slots, cLen3) of cLenCenter : setLen(n.slots, cLenCenter) of cLen4 : setLen(n.slots, cLen4) - else: nil + else: discard Result = n else : @@ -232,7 +232,7 @@ proc InsertItem[T,D](APath: RPath[T,D], ANode:PNode[T,D], AKey: T, AValue: D) = of cLen3: setLen(APath.Nd.slots, cLenCenter) of cLenCenter: setLen(APath.Nd.slots, cLen4) of cLen4: setLen(APath.Nd.slots, cLenMax) - else: nil + else: discard for i in countdown(APath.Nd.Count.int - 1, x + 1): shallowCopy(APath.Nd.slots[i], APath.Nd.slots[i - 1]) APath.Nd.slots[x] = setItem(AKey, AValue, ANode) |