Get rid of initialization warning

This commit is contained in:
Dennis Felsing
2016-08-23 12:26:38 +02:00
parent 660e4e7123
commit 2ee88fef53

View File

@@ -3232,7 +3232,7 @@ proc `[]`*[Idx, T](a: array[Idx, T], x: Slice[int]): seq[T] =
when low(a) < 0:
{.error: "Slicing for arrays with negative indices is unsupported.".}
var L = x.b - x.a + 1
newSeq(result, L)
result = newSeq[T](L)
for i in 0.. <L: result[i] = a[i + x.a]
proc `[]=`*[Idx, T](a: var array[Idx, T], x: Slice[int], b: openArray[T]) =
@@ -3681,4 +3681,4 @@ when defined(nimconfig):
when defined(windows) and appType == "console" and not defined(nimconfig):
proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32",
importc: "SetConsoleOutputCP".}
discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage
discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage