mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Cleanup Position::to_fen()
Less invasive then previous patches, but still a good enhancement. Also some indulge on STL algorithms :-) No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -180,10 +180,8 @@ inline Square square_from_string(const std::string& str) {
|
||||
}
|
||||
|
||||
inline const std::string square_to_string(Square s) {
|
||||
std::string str;
|
||||
str += file_to_char(square_file(s));
|
||||
str += rank_to_char(square_rank(s));
|
||||
return str;
|
||||
return std::string(1, file_to_char(square_file(s)))
|
||||
+ std::string(1, rank_to_char(square_rank(s)));
|
||||
}
|
||||
|
||||
inline bool file_is_ok(File f) {
|
||||
|
||||
Reference in New Issue
Block a user