]> git.sesse.net Git - stockfish/commitdiff
Further simplification of TT replace strategy
authorJean-Francois Romang <jeanfrancois.romang@gmail.com>
Thu, 27 Mar 2014 17:38:19 +0000 (18:38 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 29 Mar 2014 09:05:02 +0000 (10:05 +0100)
No functional change

src/tt.cpp

index d887844caf12eccae99b84c63ffc9d15a193ef48..efaf9928213f7b2aa06e80c4a4d197d80322bb75 100644 (file)
@@ -111,9 +111,9 @@ void TranspositionTable::store(const Key key, Value v, Bound b, Depth d, Move m,
       }
 
       // Implement replace strategy
-      if (  (replace->generation8 == generation) * 2
-          - (tte->generation8 == generation || tte->bound() == BOUND_EXACT) * 2
-          + (tte->depth16 < replace->depth16) > 0)
+      if (  (    tte->generation8 == generation || tte->bound() == BOUND_EXACT)
+          - (replace->generation8 == generation)
+          < (tte->depth16 < replace->depth16))
           replace = tte;
   }