1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 11:57:35 +00:00

LibWeb: Port AvailableSpace from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-11-20 23:17:38 +13:00 committed by Tim Flynn
parent 6e48d9f2e6
commit 66ac0d88a3
2 changed files with 12 additions and 12 deletions

View file

@ -30,24 +30,24 @@ AvailableSize AvailableSize::make_max_content()
return AvailableSize { Type::MaxContent, CSSPixels::max() };
}
DeprecatedString AvailableSize::to_deprecated_string() const
String AvailableSize::to_string() const
{
switch (m_type) {
case Type::Definite:
return DeprecatedString::formatted("definite({})", m_value);
return MUST(String::formatted("definite({})", m_value));
case Type::Indefinite:
return "indefinite";
return "indefinite"_string;
case Type::MinContent:
return "min-content";
return "min-content"_string;
case Type::MaxContent:
return "max-content";
return "max-content"_string;
}
VERIFY_NOT_REACHED();
}
DeprecatedString AvailableSpace::to_deprecated_string() const
String AvailableSpace::to_string() const
{
return DeprecatedString::formatted("{} x {}", width, height);
return MUST(String::formatted("{} x {}", width, height));
}
AvailableSize::AvailableSize(Type type, CSSPixels value)