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

Everywhere: Rename {Deprecated => Byte}String

This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
Ali Mohammad Pur 2023-12-16 17:49:34 +03:30 committed by Ali Mohammad Pur
parent 38d62563b3
commit 5e1499d104
1615 changed files with 10257 additions and 10257 deletions

View file

@ -12,7 +12,7 @@
namespace Spreadsheet {
void Cell::set_data(DeprecatedString new_data)
void Cell::set_data(ByteString new_data)
{
// If we are a formula, we do not save the beginning '=', if the new_data is "" we can simply change our kind
if (m_kind == Formula && m_data.is_empty() && new_data.is_empty()) {
@ -43,7 +43,7 @@ void Cell::set_data(JS::Value new_data)
StringBuilder builder;
builder.append(new_data.to_string_without_side_effects());
m_data = builder.to_deprecated_string();
m_data = builder.to_byte_string();
m_evaluated_data = move(new_data);
}
@ -86,7 +86,7 @@ CellType const& Cell::type() const
return *CellType::get_by_name("Identity"sv);
}
JS::ThrowCompletionOr<DeprecatedString> Cell::typed_display() const
JS::ThrowCompletionOr<ByteString> Cell::typed_display() const
{
return type().display(const_cast<Cell&>(*this), m_type_metadata);
}
@ -163,13 +163,13 @@ JS::Value Cell::js_data()
return JS::PrimitiveString::create(vm, m_data);
}
DeprecatedString Cell::source() const
ByteString Cell::source() const
{
StringBuilder builder;
if (m_kind == Formula)
builder.append('=');
builder.append(m_data);
return builder.to_deprecated_string();
return builder.to_byte_string();
}
// FIXME: Find a better way to figure out dependencies