1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +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

@ -10,7 +10,7 @@
#include <sys/arch/regs.h>
#ifndef KERNEL
# include <AK/DeprecatedString.h>
# include <AK/ByteString.h>
#endif
namespace ELF::Core {
@ -39,9 +39,9 @@ struct [[gnu::packed]] ProcessInfo {
// Keys:
// - "pid" (int)
// - "termination_signal" (u8)
// - "executable_path" (DeprecatedString)
// - "arguments" (Vector<DeprecatedString>)
// - "environment" (Vector<DeprecatedString>)
// - "executable_path" (ByteString)
// - "arguments" (Vector<ByteString>)
// - "environment" (Vector<ByteString>)
char json_data[]; // Null terminated
};
@ -59,7 +59,7 @@ struct [[gnu::packed]] MemoryRegionInfo {
char region_name[]; // Null terminated
#ifndef KERNEL
DeprecatedString object_name() const
ByteString object_name() const
{
StringView memory_region_name { region_name, strlen(region_name) };
if (memory_region_name.contains("Loader.so"sv))
@ -67,7 +67,7 @@ struct [[gnu::packed]] MemoryRegionInfo {
auto maybe_colon_index = memory_region_name.find(':');
if (!maybe_colon_index.has_value())
return {};
return memory_region_name.substring_view(0, *maybe_colon_index).to_deprecated_string();
return memory_region_name.substring_view(0, *maybe_colon_index).to_byte_string();
}
#endif
};