mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Remove some useless casts
No functional change.
This commit is contained in:
@@ -297,7 +297,7 @@ void Position::set(const string& fenStr, bool isChess960, Thread* th) {
|
||||
|
||||
// Convert from fullmove starting from 1 to ply starting from 0,
|
||||
// handle also common incorrect FEN with fullmove = 0.
|
||||
gamePly = std::max(2 * (gamePly - 1), 0) + int(sideToMove == BLACK);
|
||||
gamePly = std::max(2 * (gamePly - 1), 0) + (sideToMove == BLACK);
|
||||
|
||||
chess960 = isChess960;
|
||||
thisThread = th;
|
||||
@@ -424,7 +424,7 @@ const string Position::fen() const {
|
||||
ss << '-';
|
||||
|
||||
ss << (ep_square() == SQ_NONE ? " - " : " " + to_string(ep_square()) + " ")
|
||||
<< st->rule50 << " " << 1 + (gamePly - int(sideToMove == BLACK)) / 2;
|
||||
<< st->rule50 << " " << 1 + (gamePly - (sideToMove == BLACK)) / 2;
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user