mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Drop Stats c'tors
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.
This commit is contained in:
@@ -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]; }
|
const T* operator[](Piece pc) const { return table[pc]; }
|
||||||
T* operator[](Piece pc) { return table[pc]; }
|
T* operator[](Piece pc) { return table[pc]; }
|
||||||
void clear() { std::memset(table, 0, sizeof(table)); }
|
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)]; }
|
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 clear() { std::memset(table, 0, sizeof(table)); }
|
||||||
void update(Color c, Move m, Value v) {
|
void update(Color c, Move m, Value v) {
|
||||||
|
|||||||
Reference in New Issue
Block a user