Fix "pass ss->eval to qsearch()" condition
authorMarco Costalba <mcostalba@gmail.com>
Mon, 19 Jul 2010 11:28:33 +0000 (12:28 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 19 Jul 2010 11:28:33 +0000 (12:28 +0100)
The seocond check is no more needed now and
anyhow is wrong to overwrite a TT entry if
present.

Spotted by Ralph Stoesser.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 20beb23a11c44e0f75bcd99a08c506d7373e1658..b57d040069cc2d9fbb7f1cae81f1174d5dca0c04 100644 (file)
@@ -1108,7 +1108,7 @@ namespace {
         && !pos.has_pawn_on_7th(pos.side_to_move()))
     {
         // Pass ss->eval to qsearch() and avoid an evaluate call
-        if (!tte || tte->static_value() == VALUE_NONE)
+        if (!tte)
             TT.store(posKey, ss->eval, VALUE_TYPE_EXACT, Depth(-127*OnePly), MOVE_NONE, ss->eval, ei.kingDanger[pos.side_to_move()]);
 
         Value rbeta = beta - razor_margin(depth);