]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Run PVS-STUDIO analyzer
[stockfish] / src / movepick.h
index 412c08e2861ab1bac41868a20b8b6c7639db986c..e64ebfade18308a55046c7b61e396e1800bb7f75 100644 (file)
@@ -39,7 +39,7 @@
 template<typename T>
 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: