Removed unneeded conversion
This commit is contained in:
parent
5e17ffae3a
commit
d3ef34b325
1 changed files with 2 additions and 3 deletions
|
|
@ -103,9 +103,8 @@ when defined(c):
|
||||||
## with the 'c' flag. Otherwise, float types are passed to the generic writeText
|
## with the 'c' flag. Otherwise, float types are passed to the generic writeText
|
||||||
## procedure.
|
## procedure.
|
||||||
var buffer: array[65, char]
|
var buffer: array[65, char]
|
||||||
discard writeFloatToBuffer(buffer, x)
|
let blen = writeFloatToBuffer(buffer, x)
|
||||||
let bs: cstring = addr buffer
|
write s, buffer.toOpenArray(0, blen - 1)
|
||||||
write s, bs.toOpenArray(0, bs.len - 1)
|
|
||||||
|
|
||||||
template writeText*(s: OutputStream, str: string) =
|
template writeText*(s: OutputStream, str: string) =
|
||||||
write s, str
|
write s, str
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue