]> git.sesse.net Git - stockfish/blobdiff - src/maxgain.cpp
Introduce update_gains() and refactor some code
[stockfish] / src / maxgain.cpp
index 8c1ff48a3a44946cf8983f931406a9c71912228d..394cc225d6a69251d0c01a014544814e0987fa9e 100644 (file)
@@ -47,12 +47,8 @@ void MaxGain::clear() {
 
 /// MaxGain::store
 
-void MaxGain::store(Piece p, Square from, Square to, Value prev, Value curr)
+void MaxGain::store(Piece p, Square from, Square to, Value delta)
 {
-  if (prev == VALUE_NONE || curr == VALUE_NONE)
-    return;
-
-  Value delta = curr - prev;
   if (delta >= maxStaticValueDelta[p][from][to])
     maxStaticValueDelta[p][from][to] = delta;
   else