mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-28 03:16:32 +00:00
replace doAssert false with raiseAssert in lib, which works better with strictdefs (#22458)
This commit is contained in:
@@ -86,7 +86,7 @@ proc writeFloatToBuffer*(buf: var array[65, char]; value: BiggestFloat | float32
|
||||
|
||||
proc addFloatRoundtrip*(result: var string; x: float | float32) =
|
||||
when nimvm:
|
||||
doAssert false
|
||||
raiseAssert "unreachable"
|
||||
else:
|
||||
var buffer {.noinit.}: array[65, char]
|
||||
let n = writeFloatToBufferRoundtrip(buffer, x)
|
||||
@@ -94,7 +94,7 @@ proc addFloatRoundtrip*(result: var string; x: float | float32) =
|
||||
|
||||
proc addFloatSprintf*(result: var string; x: float) =
|
||||
when nimvm:
|
||||
doAssert false
|
||||
raiseAssert "unreachable"
|
||||
else:
|
||||
var buffer {.noinit.}: array[65, char]
|
||||
let n = writeFloatToBufferSprintf(buffer, x)
|
||||
|
||||
Reference in New Issue
Block a user