case consistency part 1
This commit is contained in:
parent
9e92455a53
commit
2df9b442c6
88 changed files with 1266 additions and 1144 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue