mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Don't double check for move legality
In case of a RootNode or a SpNode move has been already checked for legality so we can skip a redundant check. Spotted by Frank Genot. No functional change.
This commit is contained in:
@@ -893,7 +893,7 @@ split_point_start: // At split points actual search starts from here
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for legality only before to do the move
|
// Check for legality only before to do the move
|
||||||
if (!pos.pl_move_is_legal(move, ci.pinned))
|
if (!RootNode && !SpNode && !pos.pl_move_is_legal(move, ci.pinned))
|
||||||
{
|
{
|
||||||
moveCount--;
|
moveCount--;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user