1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07: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

@ -11,7 +11,7 @@
namespace DNS {
Answer::Answer(Name const& name, RecordType type, RecordClass class_code, u32 ttl, DeprecatedString const& record_data, bool mdns_cache_flush)
Answer::Answer(Name const& name, RecordType type, RecordClass class_code, u32 ttl, ByteString const& record_data, bool mdns_cache_flush)
: m_name(name)
, m_type(type)
, m_class_code(class_code)
@ -115,11 +115,11 @@ ErrorOr<void> encode(Encoder& encoder, DNS::Answer const& answer)
template<>
ErrorOr<DNS::Answer> decode(Decoder& decoder)
{
auto name = TRY(decoder.decode<DeprecatedString>());
auto name = TRY(decoder.decode<ByteString>());
auto record_type = TRY(decoder.decode<DNS::RecordType>());
auto class_code = TRY(decoder.decode<DNS::RecordClass>());
auto ttl = TRY(decoder.decode<u32>());
auto record_data = TRY(decoder.decode<DeprecatedString>());
auto record_data = TRY(decoder.decode<ByteString>());
auto cache_flush = TRY(decoder.decode<bool>());
return DNS::Answer { name, record_type, class_code, ttl, record_data, cache_flush };