pass in a pointer to the END of a buffer..
| 400 | |
| 401 | // pass in a pointer to the END of a buffer.. |
| 402 | static char* numberToString (char* t, int64 n) noexcept |
| 403 | { |
| 404 | if (n >= 0) |
| 405 | return printDigits (t, static_cast<uint64> (n)); |
| 406 | |
| 407 | // NB: this needs to be careful not to call -std::numeric_limits<int64>::min(), |
| 408 | // which has undefined behaviour |
| 409 | t = printDigits (t, static_cast<uint64> (-(n + 1)) + 1); |
| 410 | *--t = '-'; |
| 411 | return t; |
| 412 | } |
| 413 | |
| 414 | static char* numberToString (char* t, uint64 v) noexcept |
| 415 | { |
no test coverage detected