| 69 | |
| 70 | template <class TValue> |
| 71 | void FormatIntValue( |
| 72 | TStringBuilderBase* builder, |
| 73 | TValue value, |
| 74 | TStringBuf format, |
| 75 | TStringBuf genericSpec) |
| 76 | { |
| 77 | if (format == TStringBuf("v")) { |
| 78 | constexpr int MaxResultSize = 64; |
| 79 | char buffer[MaxResultSize]; |
| 80 | char* end = buffer + MaxResultSize; |
| 81 | char* start = WriteDecIntToBufferBackwards(end, value); |
| 82 | builder->AppendString(TStringBuf(start, end)); |
| 83 | } else if (format == TStringBuf("x") || format == TStringBuf("X")) { |
| 84 | constexpr int MaxResultSize = 64; |
| 85 | char buffer[MaxResultSize]; |
| 86 | char* end = buffer + MaxResultSize; |
| 87 | char* start = WriteHexIntToBufferBackwards(end, value, format[0] == 'X'); |
| 88 | builder->AppendString(TStringBuf(start, end)); |
| 89 | } else { |
| 90 | FormatValueViaSprintf(builder, value, format, genericSpec); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | #define XX(type) \ |
| 95 | template \ |
nothing calls this directly
no test coverage detected