1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

AK: Add Formatter<FormatString> as helper class.

This commit is contained in:
asynts 2021-01-09 01:00:22 +01:00 committed by Andreas Kling
parent 9a842ec419
commit 1160817a9e
13 changed files with 64 additions and 94 deletions

View file

@ -47,17 +47,3 @@ const LogStream& operator<<(const LogStream& stream, const ModelIndex& value)
}
}
namespace AK {
void Formatter<GUI::ModelIndex>::format(FormatBuilder& builder, const GUI::ModelIndex& value)
{
Formatter<StringView> formatter { *this };
if (value.internal_data())
formatter.format(builder, String::formatted("ModelIndex({},{},{:p})", value.row(), value.column(), value.internal_data()));
else
formatter.format(builder, String::formatted("ModelIndex({},{})", value.row(), value.column()));
}
}