| 29 | using StreamWriterPtr = std::unique_ptr<StreamWriter>; |
| 30 | |
| 31 | StringContainer valueToString(LargestInt value) { |
| 32 | UIntToStringBuffer buffer; |
| 33 | char* current = buffer + sizeof(buffer); |
| 34 | if (value == Value::minLargestInt) { |
| 35 | uintToString(LargestUInt(Value::maxLargestInt) + 1, current); |
| 36 | *--current = '-'; |
| 37 | } else if (value < 0) { |
| 38 | uintToString(LargestUInt(-value), current); |
| 39 | *--current = '-'; |
| 40 | } else { |
| 41 | uintToString(LargestUInt(value), current); |
| 42 | } |
| 43 | assert(current >= buffer); |
| 44 | return current; |
| 45 | } |
| 46 | |
| 47 | StringContainer valueToString(LargestUInt value) { |
| 48 | UIntToStringBuffer buffer; |
no test coverage detected