mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06: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
|
@ -54,19 +54,19 @@ public:
|
|||
fflush(m_file);
|
||||
}
|
||||
|
||||
void print_opcode(DeprecatedString const& system, OpCode& opcode, MatchState& state, size_t recursion = 0, bool newline = true) const
|
||||
void print_opcode(ByteString const& system, OpCode& opcode, MatchState& state, size_t recursion = 0, bool newline = true) const
|
||||
{
|
||||
out(m_file, "{:15} | {:5} | {:9} | {:35} | {:30} | {:20}",
|
||||
system.characters(),
|
||||
state.instruction_position,
|
||||
recursion,
|
||||
opcode.to_deprecated_string().characters(),
|
||||
opcode.to_byte_string().characters(),
|
||||
opcode.arguments_string().characters(),
|
||||
DeprecatedString::formatted("ip: {:3}, sp: {:3}", state.instruction_position, state.string_position));
|
||||
ByteString::formatted("ip: {:3}, sp: {:3}", state.instruction_position, state.string_position));
|
||||
if (newline)
|
||||
outln();
|
||||
if (newline && is<OpCode_Compare>(opcode)) {
|
||||
for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_deprecated_string())
|
||||
for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_byte_string())
|
||||
outln(m_file, "{:15} | {:5} | {:9} | {:35} | {:30} | {:20}", "", "", "", "", line, "");
|
||||
}
|
||||
}
|
||||
|
@ -84,10 +84,10 @@ public:
|
|||
builder.appendff(", next ip: {}", state.instruction_position + opcode.size());
|
||||
}
|
||||
|
||||
outln(m_file, " | {:20}", builder.to_deprecated_string());
|
||||
outln(m_file, " | {:20}", builder.to_byte_string());
|
||||
|
||||
if (is<OpCode_Compare>(opcode)) {
|
||||
for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_deprecated_string(input)) {
|
||||
for (auto& line : to<OpCode_Compare>(opcode).variable_arguments_to_byte_string(input)) {
|
||||
outln(m_file, "{:15} | {:5} | {:9} | {:35} | {:30} | {:20}", "", "", "", "", line, "");
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
for (size_t i = 0; i < length; ++i) {
|
||||
builder.append('=');
|
||||
}
|
||||
auto str = builder.to_deprecated_string();
|
||||
auto str = builder.to_byte_string();
|
||||
VERIFY(!str.is_empty());
|
||||
|
||||
outln(m_file, "{}", str);
|
||||
|
@ -114,11 +114,11 @@ public:
|
|||
builder.append('-');
|
||||
}
|
||||
builder.append('\n');
|
||||
m_debug_stripline = builder.to_deprecated_string();
|
||||
m_debug_stripline = builder.to_byte_string();
|
||||
}
|
||||
|
||||
private:
|
||||
DeprecatedString m_debug_stripline;
|
||||
ByteString m_debug_stripline;
|
||||
FILE* m_file;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue