mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Rename squares_aligned()
Rename to the shorter but still clear aligned() No functional change.
This commit is contained in:
@@ -515,7 +515,7 @@ bool Position::legal(Move m, Bitboard pinned) const {
|
||||
// is moving along the ray towards or away from the king.
|
||||
return !pinned
|
||||
|| !(pinned & from)
|
||||
|| squares_aligned(from, to_sq(m), king_square(us));
|
||||
|| aligned(from, to_sq(m), king_square(us));
|
||||
}
|
||||
|
||||
|
||||
@@ -658,7 +658,7 @@ bool Position::gives_check(Move m, const CheckInfo& ci) const {
|
||||
{
|
||||
// For pawn and king moves we need to verify also direction
|
||||
if ( (pt != PAWN && pt != KING)
|
||||
|| !squares_aligned(from, to, king_square(~sideToMove)))
|
||||
|| !aligned(from, to, king_square(~sideToMove)))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user