]> git.sesse.net Git - stockfish/blobdiff - src/history.h
Small cleanup in init_sliding_attacks()
[stockfish] / src / history.h
index c01893321dd63a33cd9aa4abfa0e1804caa7de2e..0459c8fb48090b8b972438af6ad243d13ce630cd 100644 (file)
@@ -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 {