X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftt.cpp;h=9dbfcb5ac92e5fada772fd8c20a74a4a41921c63;hp=8a66812a79c1eda84909dc20d09ead945a1c89de;hb=3cf6471738dc704ddf553d5f8d2dc9875c2ccbe7;hpb=9edc7d6958fd616daecb0ab9ae2aa92042b3d34a diff --git a/src/tt.cpp b/src/tt.cpp index 8a66812a..9dbfcb5a 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -82,7 +82,7 @@ void TranspositionTable::clear() { /// more valuable than a TTEntry t2 if t1 is from the current search and t2 is from /// a previous search, or if the depth of t1 is bigger than the depth of t2. -void TranspositionTable::store(const Key posKey, Value v, Bound b, Depth d, Move m) { +void TranspositionTable::store(const Key posKey, Value v, Bound t, Depth d, Move m, Value statV, Value kingD) { int c1, c2, c3; TTEntry *tte, *replace; @@ -92,16 +92,13 @@ void TranspositionTable::store(const Key posKey, Value v, Bound b, Depth d, Move for (int i = 0; i < ClusterSize; i++, tte++) { - if (!tte->key()) - tte->save(posKey32, v, b, d, m, generation); - - if (tte->key() == posKey32) + if (!tte->key() || tte->key() == posKey32) // Empty or overwrite old { // Preserve any existing ttMove if (m == MOVE_NONE) m = tte->move(); - tte->update(v, b, d, m, generation); + tte->save(posKey32, v, t, d, m, generation, statV, kingD); return; } @@ -113,7 +110,7 @@ void TranspositionTable::store(const Key posKey, Value v, Bound b, Depth d, Move if (c1 + c2 + c3 > 0) replace = tte; } - replace->save(posKey32, v, b, d, m, generation); + replace->save(posKey32, v, t, d, m, generation, statV, kingD); }