[Zion] Move to StrFormat for debug line.

This commit is contained in:
Drew Galbraith 2023-11-05 09:24:09 -08:00
parent 4af19d010f
commit 69aced2220
23 changed files with 142 additions and 89 deletions

View file

@ -54,6 +54,11 @@ void StrFormatValue(StringBuilder& builder, ErrorCode value, StringView opts) {
StrFormatValue(builder, static_cast<uint64_t>(value), opts);
}
template <>
void StrFormatValue(StringBuilder& builder, char value, StringView opts) {
builder.PushBack(value);
}
template <>
void StrFormatValue(StringBuilder& builder, const char* value,
StringView opts) {
@ -65,6 +70,11 @@ void StrFormatValue(StringBuilder& builder, StringView value, StringView opts) {
StrFormatInternal(builder, value);
}
template <>
void StrFormatValue(StringBuilder& builder, String value, StringView opts) {
StrFormatInternal(builder, value);
}
void StrFormatInternal(StringBuilder& builder, StringView format) {
// TODO: Consider throwing an error if there are unhandled format
builder.PushBack(format);