X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.h;h=e64ebfade18308a55046c7b61e396e1800bb7f75;hp=412c08e2861ab1bac41868a20b8b6c7639db986c;hb=ca3835857435590865fd41aac9bf4c1cda76dfc3;hpb=7f300a769848c695fb28da444b0c3f4c1d919945 diff --git a/src/movepick.h b/src/movepick.h index 412c08e2..e64ebfad 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -39,7 +39,7 @@ template struct Stats { - static const Value Max = Value(1<<28); + static const Value Max = Value(1 << 28); const T* operator[](Piece pc) const { return table[pc]; } T* operator[](Piece pc) { return table[pc]; } @@ -53,8 +53,8 @@ struct Stats { void update(Piece pc, Square to, Value v) { - table[pc][to] -= table[pc][to] * std::min(abs(int(v)), 512) / 512; - table[pc][to] += int(v) * 64; + table[pc][to] -= table[pc][to] * std::min(abs(v), 512) / 512; + table[pc][to] += v * 64; } private: