]> git.sesse.net Git - stockfish/commitdiff
Small code style in qsearch
authorMarco Costalba <mcostalba@gmail.com>
Tue, 21 Sep 2010 12:40:10 +0000 (14:40 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 21 Sep 2010 19:04:15 +0000 (20:04 +0100)
No functional change.

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

index df4c854030d9ba82b74dece6f469b4ba7057793b..bd482eaeb769d1a63f6e55c17903e29c797c38bb 100644 (file)
@@ -1434,12 +1434,11 @@ namespace {
             assert(tte->static_value() != VALUE_NONE);
 
             evalMargin = tte->static_value_margin();
-            bestValue = tte->static_value();
+            ss->eval = bestValue = tte->static_value();
         }
         else
-            bestValue = evaluate(pos, evalMargin);
+            ss->eval = bestValue = evaluate(pos, evalMargin);
 
-        ss->eval = bestValue;
         update_gains(pos, (ss-1)->currentMove, (ss-1)->eval, ss->eval);
 
         // Stand pat. Return immediately if static value is at least beta
@@ -1458,7 +1457,7 @@ namespace {
         deepChecks = (depth == -ONE_PLY && bestValue >= beta - PawnValueMidgame / 8);
 
         // Futility pruning parameters, not needed when in check
-        futilityBase = bestValue + FutilityMarginQS + evalMargin;
+        futilityBase = ss->eval + evalMargin + FutilityMarginQS;
         enoughMaterial = pos.non_pawn_material(pos.side_to_move()) > RookValueMidgame;
     }
 
@@ -1498,7 +1497,7 @@ namespace {
           }
       }
 
-      // Detect blocking evasions that are candidate to be pruned
+      // Detect non-capture evasions that are candidate to be pruned
       evasionPrunable =   isCheck
                        && bestValue > value_mated_in(PLY_MAX)
                        && !pos.move_is_capture(move)