Clean out Deprecated proc (#14797)

* Remove and/or clean out Deprecated 'add' proc for floats
* Update a test
This commit is contained in:
Juan Carlos 2020-06-29 04:33:07 -03:00 • committed by GitHub
commit 5d5df4a394
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 25 deletions

View file

@ -66,10 +66,6 @@ proc addInt*(result: var string; x: int64) =
for j in 0..i div 2 - 1:
swap(result[base+j], result[base+i-j-1])
proc add*(result: var string; x: int64) {.deprecated:
"Deprecated since v0.20, use 'addInt'".} =
addInt(result, x)
proc nimIntToStr(x: int): string {.compilerRtl.} =
result = newStringOfCap(sizeof(x)*4)
result.addInt x
@ -98,10 +94,6 @@ proc addFloat*(result: var string; x: float) =
let n = writeFloatToBuffer(buffer, x)
result.addCstringN(cstring(buffer[0].addr), n)
proc add*(result: var string; x: float) {.deprecated:
"Deprecated since v0.20, use 'addFloat'".} =
addFloat(result, x)
proc nimFloatToStr(f: float): string {.compilerproc.} =
result = newStringOfCap(8)
result.addFloat f