Use std::vector<Thread*> to store threads

We store pointers instead of Thread objects because
Thread is not copy-constructible nor copy-assignable
and default ones are not suitable. So we cannot store
directly in a std::vector.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-03-24 21:36:33 +01:00
parent 553655eb07
commit 41561c9bb8
4 changed files with 57 additions and 46 deletions

View File

@@ -357,13 +357,12 @@ namespace {
template<bool Trace>
Value do_evaluate(const Position& pos, Value& margin) {
assert(!pos.in_check());
EvalInfo ei;
Value margins[2];
Score score, mobilityWhite, mobilityBlack;
assert(pos.thread() >= 0 && pos.thread() < MAX_THREADS);
assert(!pos.in_check());
// Initialize score by reading the incrementally updated scores included
// in the position object (material + piece square tables).
score = pos.value();