X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fhistory.h;h=0459c8fb48090b8b972438af6ad243d13ce630cd;hp=c01893321dd63a33cd9aa4abfa0e1804caa7de2e;hb=59c85346d28f96ae69e172ff7187ccfbbf78d180;hpb=e06c99cad087f2937f14b850d4075749ca23e996 diff --git a/src/history.h b/src/history.h index c0189332..0459c8fb 100644 --- a/src/history.h +++ b/src/history.h @@ -38,7 +38,6 @@ class History { public: - History() { clear(); } void clear(); Value value(Piece p, Square to) const; void update(Piece p, Square to, Value bonus); @@ -62,7 +61,7 @@ inline Value History::value(Piece p, Square to) const { } inline void History::update(Piece p, Square to, Value bonus) { - if (abs(history[p][to]) < MaxValue) history[p][to] += bonus; + if (abs(history[p][to] + bonus) < MaxValue) history[p][to] += bonus; } inline Value History::gain(Piece p, Square to) const {