Retire undo_null_move()

Use a templetized do_null_move() to do/undo the null move.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-10-29 17:49:20 +01:00
parent e896368496
commit 08abe8b4a3
3 changed files with 33 additions and 47 deletions

View File

@@ -870,12 +870,12 @@ namespace {
if (refinedValue - PawnValueMidgame > beta)
R++;
pos.do_null_move(st);
pos.do_null_move<true>(st);
(ss+1)->skipNullMove = true;
nullValue = depth-R*ONE_PLY < ONE_PLY ? -qsearch<NonPV>(pos, ss+1, -beta, -alpha, DEPTH_ZERO)
: - search<NonPV>(pos, ss+1, -beta, -alpha, depth-R*ONE_PLY);
(ss+1)->skipNullMove = false;
pos.undo_null_move();
pos.do_null_move<false>(st);
if (nullValue >= beta)
{