]> git.sesse.net Git - stockfish/commitdiff
Drop Stats c'tors
authorMarco Costalba <mcostalba@gmail.com>
Sat, 7 Jan 2017 09:13:49 +0000 (10:13 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 7 Jan 2017 09:14:39 +0000 (10:14 +0100)
Now taht we correctly value-initialize Thread objects,
we don't need c'tors anymore because tables will be
zero-initialized by the compier when Thread object
is instanced.

Verified that we have no errors with Valgrind.

No functional change.

src/movepick.h

index 06a2efca77498b44f5e36f226f5ce73e938a0eba..6fbd8be1387fc46ce277a03f29a1f2442171ac19 100644 (file)
@@ -41,7 +41,6 @@ struct Stats {
 
   static const Value Max = Value(1 << 28);
 
 
   static const Value Max = Value(1 << 28);
 
-  Stats() { clear(); }
   const T* operator[](Piece pc) const { return table[pc]; }
   T* operator[](Piece pc) { return table[pc]; }
   void clear() { std::memset(table, 0, sizeof(table)); }
   const T* operator[](Piece pc) const { return table[pc]; }
   T* operator[](Piece pc) { return table[pc]; }
   void clear() { std::memset(table, 0, sizeof(table)); }
@@ -66,7 +65,6 @@ typedef Stats<CounterMoveStats> CounterMoveHistoryStats;
 
 struct FromToStats {
 
 
 struct FromToStats {
 
-  FromToStats() { clear(); }
   Value get(Color c, Move m) const { return table[c][from_sq(m)][to_sq(m)]; }
   void clear() { std::memset(table, 0, sizeof(table)); }
   void update(Color c, Move m, Value v) {
   Value get(Color c, Move m) const { return table[c][from_sq(m)][to_sq(m)]; }
   void clear() { std::memset(table, 0, sizeof(table)); }
   void update(Color c, Move m, Value v) {