Merge branch 'devel' into range_float_type

This commit is contained in:
cooldome 2018-04-30 23:57:33 +01:00
commit d21693f5e4
48 changed files with 424 additions and 2372 deletions

View file

@ -1,7 +1,7 @@
# bug 2007
import asyncdispatch, asyncnet, logging, json, uri, strutils, future
import asyncdispatch, asyncnet, logging, json, uri, strutils, sugar
type
Builder = ref object
@ -27,7 +27,7 @@ proc newBuild*(onProgress: ProgressCB): Build =
result.onProgress = onProgress
proc start(build: Build, repo, hash: string) {.async.} =
let path = repo.parseUri().path.toLower()
let path = repo.parseUri().path.toLowerAscii()
proc onProgress(builder: Builder, message: string) {.async.} =
debug($message)

View file

@ -31,7 +31,7 @@ type
s.pop() is T
type ValueType = T
const ValueTypeName = T.name.toUpper
const ValueTypeName = T.name.toUpperAscii
proc genericAlgorithm[T](s: var Stack[T], y: T) =
static:

View file

@ -7,7 +7,7 @@ task "install", "compile and install nake binary":
for index, dir in pairs(path):
echo " ", index, ". ", dir
echo "Where to install nake binary? (quit with ^C or quit or exit)"
let ans = stdin.readLine().toLower
let ans = stdin.readLine().toLowerAscii
var index = 0
case ans
of "q", "quit", "x", "exit":

View file

@ -562,7 +562,7 @@ proc importItem(data: PJsonNode; errors: var seq[string]): PItemRecord =
result.useSound = importSound(data[2], errors, "useSound")
case data[1].str.toLower
case data[1].str.toLowerAscii
of "projectile":
result.kind = Projectile
if data[2]["bullet"].kind == JString:

View file

@ -67,7 +67,7 @@ else:
for kind, key, val in getOpt():
case kind
of cmdLongOption, cmdShortOption:
case key.tolower
case key.tolowerAscii
of "tasks", "t":
printTaskList = true
else:

View file

@ -88,7 +88,7 @@ task "download", "download game assets":
if existsFile(path):
echo "The file already exists\n",
"[R]emove [M]ove [Q]uit [S]kip Source: ", GameAssets
case stdin.readLine.toLower
case stdin.readLine.toLowerAscii
of "r":
removeFile path
of "m":
@ -120,7 +120,7 @@ task "download", "download game assets":
echo "Download binary libs? Only libs for linux are available currently, enjoy the irony.\n",
"[Y]es [N]o Source: ", BinLibs
case stdin.readline.toLower
case stdin.readline.toLowerAscii
of "y", "yes":
discard ## o_O
else:

View file

@ -6,7 +6,7 @@ discard """
import strutils
var x = "hello world!".toLower.toUpper
var x = "hello world!".toLowerAscii.toUpperAscii
x.echo()
#OUT HELLO WORLD!

View file

@ -8,7 +8,7 @@ import strutils
proc foo(s: static[string]): string =
static: echo s
const R = s.toUpper
const R = s.toUpperAscii
return R
echo foo("test 1")

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,6 @@ else:
result = newString(size)
let res = WideCharToMultiByte(CP_UTF8, 0'i32, cast[LPWCSTR](addr(wc[0])), wclen,
cstring(result), size, cstring(nil), LPBOOL(nil))
result[size] = chr(0)
doAssert size == res
proc testCP(wc: WideCString, lo, hi: int) =