Skip to content

Commit

Permalink
Fix initialization of TTData
Browse files Browse the repository at this point in the history
See official-stockfish#5766
No functional change
bench: 1379150
  • Loading branch information
mstembera committed Jan 13, 2025
1 parent c085670 commit fdfad4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ std::tuple<bool, TTData, TTWriter> TranspositionTable::probe(const Key key) cons
> tte[i].depth8 - tte[i].relative_age(generation8) * 2)
replace = &tte[i];

return {false, TTData(), TTWriter(replace)};
return {false,
TTData{Move::none(), VALUE_NONE, VALUE_NONE, DEPTH_ENTRY_OFFSET, BOUND_NONE, false},
TTWriter(replace)};
}


Expand Down
4 changes: 4 additions & 0 deletions src/tt.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ struct TTData {
Depth depth;
Bound bound;
bool is_pv;

TTData() = delete;
TTData(Move m, Value v, Value ev, Depth d, Bound b, bool pv) :
move(m), value(v), eval(ev), depth(d), bound(b), is_pv(pv) {};
};


Expand Down

0 comments on commit fdfad4a

Please sign in to comment.