mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 02:27:00 +08:00
Zero init fromToStats in constructor. (#953)
Extend commit fe99de to fromToStats, which fixes the last valgrind errors on a simple 'go depth 12' at startup. No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
8b2c81d3ea
commit
90b052462c
@@ -66,6 +66,7 @@ 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