Unify History and Gains under a single Stats class

Handling of History and Gains is almost the same, with
the exception of the update logic, so unify both
classes under a single Stats struct.

No functional change.
This commit is contained in:
Marco Costalba
2013-02-02 17:13:33 +01:00
parent 53051eefc7
commit ddbe6082c4
4 changed files with 46 additions and 51 deletions

View File

@@ -371,8 +371,8 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits,
RootMoves.clear();
for (MoveList<LEGAL> ml(pos); !ml.end(); ++ml)
if ( searchMoves.empty()
|| std::count(searchMoves.begin(), searchMoves.end(), ml.move()))
if ( searchMoves.empty()
|| std::count(searchMoves.begin(), searchMoves.end(), ml.move()))
RootMoves.push_back(RootMove(ml.move()));
main_thread()->thinking = true;