mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +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
|
@ -78,12 +78,12 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Formatter<JS::Cell> : Formatter<StringView> {
|
||||
void format(TypeErasedFormatParams& params, FormatBuilder& builder, const JS::Cell* cell)
|
||||
void format(FormatBuilder& builder, const JS::Cell* cell)
|
||||
{
|
||||
if (!cell)
|
||||
Formatter<StringView>::format(params, builder, "Cell{nullptr}");
|
||||
Formatter<StringView>::format(builder, "Cell{nullptr}");
|
||||
else
|
||||
Formatter<StringView>::format(params, builder, String::formatted("{}{{{}}}", cell->class_name(), static_cast<const void*>(cell)));
|
||||
Formatter<StringView>::format(builder, String::formatted("{}{{{}}}", cell->class_name(), static_cast<const void*>(cell)));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -95,9 +95,9 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Formatter<JS::PropertyAttributes> : Formatter<u8> {
|
||||
void format(TypeErasedFormatParams& params, FormatBuilder& builder, const JS::PropertyAttributes& attributes)
|
||||
void format(FormatBuilder& builder, const JS::PropertyAttributes& attributes)
|
||||
{
|
||||
Formatter<u8>::format(params, builder, attributes.bits());
|
||||
Formatter<u8>::format(builder, attributes.bits());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -345,9 +345,9 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Formatter<JS::Value> : Formatter<StringView> {
|
||||
void format(TypeErasedFormatParams& params, FormatBuilder& builder, const JS::Value& value)
|
||||
void format(FormatBuilder& builder, const JS::Value& value)
|
||||
{
|
||||
Formatter<StringView>::format(params, builder, value.is_empty() ? "<empty>" : value.to_string_without_side_effects());
|
||||
Formatter<StringView>::format(builder, value.is_empty() ? "<empty>" : value.to_string_without_side_effects());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue