fix some warnings (#16952)

This commit is contained in:
flywind 2021-02-08 06:50:15 -06:00 • committed by GitHub
commit f140c92409
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 119 additions and 119 deletions

View file

@ -31,7 +31,7 @@ proc posReadLine[T](s: Stream, line: var string): bool =
assert s.baseReadLineImpl != nil
let n = s.buffer.len
line.string.setLen(0)
line.setLen(0)
for i in 0..<n:
var c = s.buffer.popFirst
if c == '\c':
@ -40,7 +40,7 @@ proc posReadLine[T](s: Stream, line: var string): bool =
elif c == '\L': return true
elif c == '\0':
return line.len > 0
line.string.add(c)
line.add(c)
var line2: string
result = s.baseReadLineImpl(s, line2)