1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:17:42 +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

@ -26,7 +26,7 @@ void ConnectionFromClient::die()
exit(0);
}
void ConnectionFromClient::greet(DeprecatedString const& project_root)
void ConnectionFromClient::greet(ByteString const& project_root)
{
m_filedb.set_project_root(project_root);
if (unveil(project_root.characters(), "r") < 0) {
@ -39,7 +39,7 @@ void ConnectionFromClient::greet(DeprecatedString const& project_root)
}
}
void ConnectionFromClient::file_opened(DeprecatedString const& filename, IPC::File const& file)
void ConnectionFromClient::file_opened(ByteString const& filename, IPC::File const& file)
{
if (m_filedb.is_open(filename)) {
return;
@ -48,7 +48,7 @@ void ConnectionFromClient::file_opened(DeprecatedString const& filename, IPC::Fi
m_autocomplete_engine->file_opened(filename);
}
void ConnectionFromClient::file_edit_insert_text(DeprecatedString const& filename, DeprecatedString const& text, i32 start_line, i32 start_column)
void ConnectionFromClient::file_edit_insert_text(ByteString const& filename, ByteString const& text, i32 start_line, i32 start_column)
{
dbgln_if(LANGUAGE_SERVER_DEBUG, "InsertText for file: {}", filename);
dbgln_if(LANGUAGE_SERVER_DEBUG, "Text: {}", text);
@ -57,7 +57,7 @@ void ConnectionFromClient::file_edit_insert_text(DeprecatedString const& filenam
m_autocomplete_engine->on_edit(filename);
}
void ConnectionFromClient::file_edit_remove_text(DeprecatedString const& filename, i32 start_line, i32 start_column, i32 end_line, i32 end_column)
void ConnectionFromClient::file_edit_remove_text(ByteString const& filename, i32 start_line, i32 start_column, i32 end_line, i32 end_column)
{
dbgln_if(LANGUAGE_SERVER_DEBUG, "RemoveText for file: {}", filename);
dbgln_if(LANGUAGE_SERVER_DEBUG, "[{}:{} - {}:{}]", start_line, start_column, end_line, end_column);
@ -80,7 +80,7 @@ void ConnectionFromClient::auto_complete_suggestions(CodeComprehension::ProjectL
async_auto_complete_suggestions(move(suggestions));
}
void ConnectionFromClient::set_file_content(DeprecatedString const& filename, DeprecatedString const& content)
void ConnectionFromClient::set_file_content(ByteString const& filename, ByteString const& content)
{
dbgln_if(LANGUAGE_SERVER_DEBUG, "SetFileContent: {}", filename);
auto document = m_filedb.get_document(filename);
@ -139,7 +139,7 @@ void ConnectionFromClient::get_parameters_hint(CodeComprehension::ProjectLocatio
async_parameters_hint_result(params->params, params->current_index);
}
void ConnectionFromClient::get_tokens_info(DeprecatedString const& filename)
void ConnectionFromClient::get_tokens_info(ByteString const& filename)
{
dbgln_if(LANGUAGE_SERVER_DEBUG, "GetTokenInfo: {}", filename);
auto document = m_filedb.get_document(filename);