Merge pull request #4650 from def-/devel

Get rid of initialization warning
This commit is contained in:
Andreas Rumpf
2016-08-23 14:35:46 +02:00
committed by GitHub

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