1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:57:46 +00:00

Everywhere: Rename to_{string => deprecated_string}() where applicable

This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
This commit is contained in:
Linus Groh 2022-12-06 01:12:49 +00:00 committed by Andreas Kling
parent 6e19ab2bbc
commit 57dc179b1f
597 changed files with 1973 additions and 1972 deletions

View file

@ -17,7 +17,7 @@ UCICommand UCICommand::from_string(StringView command)
return UCICommand();
}
DeprecatedString UCICommand::to_string() const
DeprecatedString UCICommand::to_deprecated_string() const
{
return "uci\n";
}
@ -35,7 +35,7 @@ DebugCommand DebugCommand::from_string(StringView command)
VERIFY_NOT_REACHED();
}
DeprecatedString DebugCommand::to_string() const
DeprecatedString DebugCommand::to_deprecated_string() const
{
if (flag() == Flag::On) {
return "debug on\n";
@ -52,7 +52,7 @@ IsReadyCommand IsReadyCommand::from_string(StringView command)
return IsReadyCommand();
}
DeprecatedString IsReadyCommand::to_string() const
DeprecatedString IsReadyCommand::to_deprecated_string() const
{
return "isready\n";
}
@ -92,10 +92,10 @@ SetOptionCommand SetOptionCommand::from_string(StringView command)
VERIFY(!name.is_empty());
return SetOptionCommand(name.to_string().trim_whitespace(), value.to_string().trim_whitespace());
return SetOptionCommand(name.to_deprecated_string().trim_whitespace(), value.to_deprecated_string().trim_whitespace());
}
DeprecatedString SetOptionCommand::to_string() const
DeprecatedString SetOptionCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("setoption name "sv);
@ -126,7 +126,7 @@ PositionCommand PositionCommand::from_string(StringView command)
return PositionCommand(fen, moves);
}
DeprecatedString PositionCommand::to_string() const
DeprecatedString PositionCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("position "sv);
@ -190,7 +190,7 @@ GoCommand GoCommand::from_string(StringView command)
return go_command;
}
DeprecatedString GoCommand::to_string() const
DeprecatedString GoCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("go"sv);
@ -238,7 +238,7 @@ StopCommand StopCommand::from_string(StringView command)
return StopCommand();
}
DeprecatedString StopCommand::to_string() const
DeprecatedString StopCommand::to_deprecated_string() const
{
return "stop\n";
}
@ -263,7 +263,7 @@ IdCommand IdCommand::from_string(StringView command)
VERIFY_NOT_REACHED();
}
DeprecatedString IdCommand::to_string() const
DeprecatedString IdCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("id "sv);
@ -285,7 +285,7 @@ UCIOkCommand UCIOkCommand::from_string(StringView command)
return UCIOkCommand();
}
DeprecatedString UCIOkCommand::to_string() const
DeprecatedString UCIOkCommand::to_deprecated_string() const
{
return "uciok\n";
}
@ -298,7 +298,7 @@ ReadyOkCommand ReadyOkCommand::from_string(StringView command)
return ReadyOkCommand();
}
DeprecatedString ReadyOkCommand::to_string() const
DeprecatedString ReadyOkCommand::to_deprecated_string() const
{
return "readyok\n";
}
@ -311,7 +311,7 @@ BestMoveCommand BestMoveCommand::from_string(StringView command)
return BestMoveCommand(Move(tokens[1]));
}
DeprecatedString BestMoveCommand::to_string() const
DeprecatedString BestMoveCommand::to_deprecated_string() const
{
StringBuilder builder;
builder.append("bestmove "sv);
@ -326,7 +326,7 @@ InfoCommand InfoCommand::from_string([[maybe_unused]] StringView command)
VERIFY_NOT_REACHED();
}
DeprecatedString InfoCommand::to_string() const
DeprecatedString InfoCommand::to_deprecated_string() const
{
// FIXME: Implement this.
VERIFY_NOT_REACHED();