Get rid of initialization warning
This commit is contained in:
parent
660e4e7123
commit
2ee88fef53
1 changed files with 2 additions and 2 deletions
|
|
@ -3232,7 +3232,7 @@ proc `[]`*[Idx, T](a: array[Idx, T], x: Slice[int]): seq[T] =
|
||||||
when low(a) < 0:
|
when low(a) < 0:
|
||||||
{.error: "Slicing for arrays with negative indices is unsupported.".}
|
{.error: "Slicing for arrays with negative indices is unsupported.".}
|
||||||
var L = x.b - x.a + 1
|
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]
|
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]) =
|
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):
|
when defined(windows) and appType == "console" and not defined(nimconfig):
|
||||||
proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32",
|
proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32",
|
||||||
importc: "SetConsoleOutputCP".}
|
importc: "SetConsoleOutputCP".}
|
||||||
discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage
|
discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue