case consistency part 1

This commit is contained in:
Araq 2013-12-27 15:48:53 +01:00
commit 2df9b442c6
88 changed files with 1266 additions and 1144 deletions

View file

@ -168,12 +168,12 @@ proc objectInit(dest: Pointer, typ: PNimType) =
of tyArray, tyArrayConstr:
for i in 0..(typ.size div typ.base.size)-1:
objectInit(cast[pointer](d +% i * typ.base.size), typ.base)
else: nil # nothing to do
else: discard # nothing to do
# ---------------------- assign zero -----------------------------------------
when not defined(nimmixin):
proc destroy(x: int) = nil
proc destroy(x: int) = discard
proc nimDestroyRange*[T](r: T) =
# internal proc used for destroying sequences and arrays
for i in countup(0, r.len - 1): destroy(r[i])