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

Userland: Prefer _string over _short_string

As `_string` can't fail anymore (since 3434412), there are no real
benefits to use the short variant in most cases.
This commit is contained in:
Lucas CHOLLET 2023-08-07 22:26:17 -04:00 committed by Andreas Kling
parent a5edc9cdfc
commit 3f35ffb648
198 changed files with 684 additions and 684 deletions

View file

@ -196,9 +196,9 @@ ErrorOr<String> Move::to_algebraic() const
{
if (piece.type == Type::King && from.file == 4) {
if (to.file == 2)
return "O-O-O"_short_string;
return "O-O-O"_string;
if (to.file == 6)
return "O-O"_short_string;
return "O-O"_string;
}
StringBuilder builder;

View file

@ -21,7 +21,7 @@ ErrorOr<NonnullOwnPtr<UCICommand>> UCICommand::from_string(StringView command)
ErrorOr<String> UCICommand::to_string() const
{
return "uci\n"_short_string;
return "uci\n"_string;
}
ErrorOr<NonnullOwnPtr<DebugCommand>> DebugCommand::from_string(StringView command)
@ -244,7 +244,7 @@ ErrorOr<NonnullOwnPtr<StopCommand>> StopCommand::from_string(StringView command)
ErrorOr<String> StopCommand::to_string() const
{
return "stop\n"_short_string;
return "stop\n"_string;
}
ErrorOr<NonnullOwnPtr<IdCommand>> IdCommand::from_string(StringView command)
@ -291,7 +291,7 @@ ErrorOr<NonnullOwnPtr<UCIOkCommand>> UCIOkCommand::from_string(StringView comman
ErrorOr<String> UCIOkCommand::to_string() const
{
return "uciok\n"_short_string;
return "uciok\n"_string;
}
ErrorOr<NonnullOwnPtr<ReadyOkCommand>> ReadyOkCommand::from_string(StringView command)
@ -519,7 +519,7 @@ ErrorOr<NonnullOwnPtr<QuitCommand>> QuitCommand::from_string(StringView command)
ErrorOr<String> QuitCommand::to_string() const
{
return "quit\n"_short_string;
return "quit\n"_string;
}
ErrorOr<NonnullOwnPtr<UCINewGameCommand>> UCINewGameCommand::from_string(StringView command)