mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Correct zero-init of Thread data members
If not explicitly initialized in a class constructor, then all data members are default-initialized when the corresponing struct/class is instanced. For array and built-in types (int, char, etc..) default-initialization is a no-op and we need to explicitly zero them. No functional change.
This commit is contained in:
@@ -37,8 +37,6 @@ Thread::Thread() {
|
||||
resetCalls = exit = false;
|
||||
maxPly = callsCnt = 0;
|
||||
tbHits = 0;
|
||||
history.clear();
|
||||
counterMoves.clear();
|
||||
idx = Threads.size(); // Start from 0
|
||||
|
||||
std::unique_lock<Mutex> lk(mutex);
|
||||
|
||||
Reference in New Issue
Block a user