mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
Get rid of initialization warning
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user