mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
MovePicker doesn't need to know if called from a pv node
This was needed by an old optimization in sorting of non-captures that is now obsoleted by new std::sort() approach. Remove also the unused depth member data. Interestingly this has always been unused since the Glaurung days. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -63,10 +63,8 @@ namespace {
|
||||
/// search captures, promotions and some checks) and about how important good
|
||||
/// move ordering is at the current node.
|
||||
|
||||
MovePicker::MovePicker(const Position& p, bool pv, Move ttm, Depth d,
|
||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d,
|
||||
const History& h, SearchStack* ss) : pos(p), H(h) {
|
||||
|
||||
pvNode = pv;
|
||||
ttMove = ttm;
|
||||
if (ss)
|
||||
{
|
||||
@@ -76,17 +74,14 @@ MovePicker::MovePicker(const Position& p, bool pv, Move ttm, Depth d,
|
||||
} else
|
||||
mateKiller = killer1 = killer2 = MOVE_NONE;
|
||||
|
||||
depth = d;
|
||||
movesPicked = 0;
|
||||
numOfMoves = 0;
|
||||
numOfBadCaptures = 0;
|
||||
checkKillers = checkLegal = false;
|
||||
movesPicked = numOfMoves = numOfBadCaptures = 0;
|
||||
checkKillers = checkLegal = finished = false;
|
||||
|
||||
if (p.is_check())
|
||||
phaseIndex = EvasionsPhaseIndex;
|
||||
else if (depth > Depth(0))
|
||||
else if (d > Depth(0))
|
||||
phaseIndex = MainSearchPhaseIndex;
|
||||
else if (depth == Depth(0))
|
||||
else if (d == Depth(0))
|
||||
phaseIndex = QsearchWithChecksPhaseIndex;
|
||||
else
|
||||
phaseIndex = QsearchWithoutChecksPhaseIndex;
|
||||
|
||||
Reference in New Issue
Block a user