mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 18:17:02 +08:00
Teach file_to_char() about upper/lower case
This allows to further simplify Position::fen() No functional change.
This commit is contained in:
@@ -441,8 +441,8 @@ inline int square_distance(Square s1, Square s2) {
|
||||
return SquareDistance[s1][s2];
|
||||
}
|
||||
|
||||
inline char file_to_char(File f) {
|
||||
return char(f - FILE_A + 'a');
|
||||
inline char file_to_char(File f, bool tolower = true) {
|
||||
return char(f - FILE_A + (tolower ? 'a' : 'A'));
|
||||
}
|
||||
|
||||
inline char rank_to_char(Rank r) {
|
||||
|
||||
Reference in New Issue
Block a user