Simplify a condition in update of best move
authorMarco Costalba <mcostalba@gmail.com>
Fri, 24 Dec 2010 16:07:00 +0000 (17:07 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 24 Dec 2010 16:09:39 +0000 (17:09 +0100)
No functional change.

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

index 294091ddd1e5da4eb02cc669368933bf06524146..4af4c25951dba776a169951dce1ff1533b3f6c8d 100644 (file)
@@ -1380,15 +1380,15 @@ split_point_start: // At split points actual search starts from here
 
           if (value > alpha)
           {
-              if (SpNode && (!PvNode || value >= beta))
-                  sp->stopRequest = true;
-
               if (PvNode && value < beta) // We want always alpha < beta
               {
                   alpha = value;
+
                   if (SpNode)
                       sp->alpha = value;
               }
+              else if (SpNode)
+                  sp->stopRequest = true;
 
               if (value == value_mate_in(ply + 1))
                   ss->mateKiller = move;