mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Save threadID info in Position
This is the best place because when we split we do a copy of the position and also threadID, once set in a given position, never changes anymore. Forbid use of Position's default and copy c'tor to avoid nasty bugs in case a position is created without explicitly setting the threadID. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+2
-2
@@ -603,7 +603,7 @@ namespace {
|
||||
|
||||
Value id_loop(const Position& pos, Move searchMoves[]) {
|
||||
|
||||
Position p(pos);
|
||||
Position p(pos, pos.thread());
|
||||
SearchStack ss[PLY_MAX_PLUS_2];
|
||||
Move EasyMove = MOVE_NONE;
|
||||
Value value, alpha = -VALUE_INFINITE, beta = VALUE_INFINITE;
|
||||
@@ -1662,7 +1662,7 @@ namespace {
|
||||
int moveCount;
|
||||
value = -VALUE_INFINITE;
|
||||
|
||||
Position pos(*sp->pos);
|
||||
Position pos(*sp->pos, threadID);
|
||||
CheckInfo ci(pos);
|
||||
int ply = pos.ply();
|
||||
SearchStack* ss = sp->sstack[threadID] + 1;
|
||||
|
||||
Reference in New Issue
Block a user