1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00: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:
Marco Costalba 2012-11-27 20:05:03 +01:00
parent 5af8179647
commit 4502917665

View file

@ -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;