Use a Thread instead of an array index

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-04-04 07:54:02 +01:00
parent 0439a79566
commit 673bc5526f
9 changed files with 76 additions and 82 deletions

View File

@@ -371,7 +371,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
margins[WHITE] = margins[BLACK] = VALUE_ZERO;
// Probe the material hash table
ei.mi = Threads[pos.this_thread()].materialTable.probe(pos);
ei.mi = pos.this_thread().materialTable.probe(pos);
score += ei.mi->material_value();
// If we have a specialized evaluation function for the current material
@@ -383,7 +383,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
}
// Probe the pawn hash table
ei.pi = Threads[pos.this_thread()].pawnTable.probe(pos);
ei.pi = pos.this_thread().pawnTable.probe(pos);
score += ei.pi->pawns_value();
// Initialize attack and king safety bitboards