mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22: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:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -51,7 +51,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
|
|||
if (elf == nullptr)
|
||||
return;
|
||||
if (g_kernel_debug_info == nullptr)
|
||||
g_kernel_debug_info = make<Debug::DebugInfo>(g_kernel_debuginfo_object->elf, DeprecatedString::empty(), base_address);
|
||||
g_kernel_debug_info = make<Debug::DebugInfo>(g_kernel_debuginfo_object->elf, ByteString::empty(), base_address);
|
||||
debug_info = g_kernel_debug_info.ptr();
|
||||
} else {
|
||||
auto const& process = node.process();
|
||||
|
@ -114,7 +114,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
|
|||
break;
|
||||
FlatPtr address_in_profiled_program = node.address() + offset_into_symbol;
|
||||
|
||||
auto disassembly = insn.value().to_deprecated_string(address_in_profiled_program, &symbol_provider);
|
||||
auto disassembly = insn.value().to_byte_string(address_in_profiled_program, &symbol_provider);
|
||||
|
||||
StringView instruction_bytes = view.substring_view(offset_into_symbol, insn.value().length());
|
||||
u32 samples_at_this_instruction = m_node.events_per_address().get(address_in_profiled_program).value_or(0);
|
||||
|
@ -200,14 +200,14 @@ GUI::Variant DisassemblyModel::data(GUI::ModelIndex const& index, GUI::ModelRole
|
|||
}
|
||||
|
||||
if (index.column() == Column::Address)
|
||||
return DeprecatedString::formatted("{:p}", insn.address);
|
||||
return ByteString::formatted("{:p}", insn.address);
|
||||
|
||||
if (index.column() == Column::InstructionBytes) {
|
||||
StringBuilder builder;
|
||||
for (auto ch : insn.bytes) {
|
||||
builder.appendff("{:02x} ", (u8)ch);
|
||||
}
|
||||
return builder.to_deprecated_string();
|
||||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
if (index.column() == Column::Disassembly)
|
||||
|
@ -229,7 +229,7 @@ GUI::Variant DisassemblyModel::data(GUI::ModelIndex const& index, GUI::ModelRole
|
|||
auto const& entry = insn.source_position_with_inlines.source_position.value();
|
||||
builder.appendff("{}:{}", entry.file_path, entry.line_number);
|
||||
}
|
||||
return builder.to_deprecated_string();
|
||||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue