mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
AK+Format: Remove TypeErasedFormatParams& from format function.
This commit is contained in:
parent
865f5ed4f6
commit
7e62ffbc6e
27 changed files with 129 additions and 134 deletions
|
@ -50,14 +50,14 @@ const LogStream& operator<<(const LogStream& stream, const ModelIndex& value)
|
|||
|
||||
namespace AK {
|
||||
|
||||
void Formatter<GUI::ModelIndex>::format(TypeErasedFormatParams& params, FormatBuilder& builder, const GUI::ModelIndex& value)
|
||||
void Formatter<GUI::ModelIndex>::format(FormatBuilder& builder, const GUI::ModelIndex& value)
|
||||
{
|
||||
Formatter<StringView> formatter { *this };
|
||||
|
||||
if (value.internal_data())
|
||||
formatter.format(params, builder, String::formatted("ModelIndex({},{},{:p})", value.row(), value.column(), value.internal_data()));
|
||||
formatter.format(builder, String::formatted("ModelIndex({},{},{:p})", value.row(), value.column(), value.internal_data()));
|
||||
else
|
||||
formatter.format(params, builder, String::formatted("ModelIndex({},{})", value.row(), value.column()));
|
||||
formatter.format(builder, String::formatted("ModelIndex({},{})", value.row(), value.column()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Formatter<GUI::ModelIndex> : Formatter<StringView> {
|
||||
void format(TypeErasedFormatParams&, FormatBuilder&, const GUI::ModelIndex&);
|
||||
void format(FormatBuilder&, const GUI::ModelIndex&);
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -70,12 +70,12 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Formatter<GUI::TextPosition> : Formatter<StringView> {
|
||||
void format(TypeErasedFormatParams& params, FormatBuilder& builder, const GUI::TextPosition& value)
|
||||
void format(FormatBuilder& builder, const GUI::TextPosition& value)
|
||||
{
|
||||
if (value.is_valid())
|
||||
Formatter<StringView>::format(params, builder, String::formatted("({},{})", value.line(), value.column()));
|
||||
Formatter<StringView>::format(builder, String::formatted("({},{})", value.line(), value.column()));
|
||||
else
|
||||
Formatter<StringView>::format(params, builder, "GUI::TextPosition(Invalid)");
|
||||
Formatter<StringView>::format(builder, "GUI::TextPosition(Invalid)");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -98,12 +98,12 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Formatter<GUI::TextRange> : Formatter<StringView> {
|
||||
void format(TypeErasedFormatParams& params, FormatBuilder& builder, const GUI::TextRange& value)
|
||||
void format(FormatBuilder& builder, const GUI::TextRange& value)
|
||||
{
|
||||
if (value.is_valid())
|
||||
Formatter<StringView>::format(params, builder, String::formatted("{}-{}", value.start(), value.end()));
|
||||
Formatter<StringView>::format(builder, String::formatted("{}-{}", value.start(), value.end()));
|
||||
else
|
||||
Formatter<StringView>::format(params, builder, "GUI::TextRange(Invalid)");
|
||||
Formatter<StringView>::format(builder, "GUI::TextRange(Invalid)");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue