mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -73,42 +73,42 @@ bool Supports::Feature::evaluate() const
|
|||
});
|
||||
}
|
||||
|
||||
String Supports::Declaration::to_string() const
|
||||
DeprecatedString Supports::Declaration::to_string() const
|
||||
{
|
||||
return String::formatted("({})", declaration);
|
||||
return DeprecatedString::formatted("({})", declaration);
|
||||
}
|
||||
|
||||
String Supports::Selector::to_string() const
|
||||
DeprecatedString Supports::Selector::to_string() const
|
||||
{
|
||||
return String::formatted("selector({})", selector);
|
||||
return DeprecatedString::formatted("selector({})", selector);
|
||||
}
|
||||
|
||||
String Supports::Feature::to_string() const
|
||||
DeprecatedString Supports::Feature::to_string() const
|
||||
{
|
||||
return value.visit([](auto& it) { return it.to_string(); });
|
||||
}
|
||||
|
||||
String Supports::InParens::to_string() const
|
||||
DeprecatedString Supports::InParens::to_string() const
|
||||
{
|
||||
return value.visit(
|
||||
[](NonnullOwnPtr<Condition> const& condition) -> String { return String::formatted("({})", condition->to_string()); },
|
||||
[](auto& it) -> String { return it.to_string(); });
|
||||
[](NonnullOwnPtr<Condition> const& condition) -> DeprecatedString { return DeprecatedString::formatted("({})", condition->to_string()); },
|
||||
[](auto& it) -> DeprecatedString { return it.to_string(); });
|
||||
}
|
||||
|
||||
String Supports::Condition::to_string() const
|
||||
DeprecatedString Supports::Condition::to_string() const
|
||||
{
|
||||
switch (type) {
|
||||
case Type::Not:
|
||||
return String::formatted("not {}", children.first().to_string());
|
||||
return DeprecatedString::formatted("not {}", children.first().to_string());
|
||||
case Type::And:
|
||||
return String::join(" and "sv, children);
|
||||
return DeprecatedString::join(" and "sv, children);
|
||||
case Type::Or:
|
||||
return String::join(" or "sv, children);
|
||||
return DeprecatedString::join(" or "sv, children);
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
String Supports::to_string() const
|
||||
DeprecatedString Supports::to_string() const
|
||||
{
|
||||
return m_condition->to_string();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue