1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

AK: Remove StringBuilder::build() in favor of to_deprecated_string()

Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
This commit is contained in:
Linus Groh 2023-01-26 18:58:09 +00:00
parent da81041e97
commit 6e7459322d
129 changed files with 213 additions and 219 deletions

View file

@ -82,7 +82,7 @@ DeprecatedString Square::to_algebraic() const
StringBuilder builder;
builder.append(file + 'a');
builder.append(rank + '1');
return builder.build();
return builder.to_deprecated_string();
}
Move::Move(StringView long_algebraic)
@ -98,7 +98,7 @@ DeprecatedString Move::to_long_algebraic() const
builder.append(from.to_algebraic());
builder.append(to.to_algebraic());
builder.append(char_for_piece(promote_to).to_lowercase());
return builder.build();
return builder.to_deprecated_string();
}
Move Move::from_algebraic(StringView algebraic, const Color turn, Board const& board)
@ -216,7 +216,7 @@ DeprecatedString Move::to_algebraic() const
else if (is_check)
builder.append('+');
return builder.build();
return builder.to_deprecated_string();
}
Board::Board()