1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Clean up refutations array in MovePicker

This is a follow-up cleanup to a45c2bc34a.

closes https://github.com/official-stockfish/Stockfish/pull/5458

No functional change
This commit is contained in:
MinetaS 2024-07-07 08:27:43 +09:00 committed by Joost VandeVondele
parent 4e9fded5a6
commit cdb0b96e07
2 changed files with 4 additions and 7 deletions

View file

@ -297,9 +297,8 @@ top:
[[fallthrough]]; [[fallthrough]];
case GOOD_QUIET : case GOOD_QUIET :
if (!skipQuiets && select<Next>([&]() { if (!skipQuiets
return *cur != refutations[0] && *cur != refutations[1] && *cur != refutations[2]; && select<Next>([&]() { return *cur != refutations[0] && *cur != refutations[1]; }))
}))
{ {
if ((cur - 1)->value > -7998 || (cur - 1)->value <= quiet_threshold(depth)) if ((cur - 1)->value > -7998 || (cur - 1)->value <= quiet_threshold(depth))
return *(cur - 1); return *(cur - 1);
@ -328,9 +327,7 @@ top:
case BAD_QUIET : case BAD_QUIET :
if (!skipQuiets) if (!skipQuiets)
return select<Next>([&]() { return select<Next>([&]() { return *cur != refutations[0] && *cur != refutations[1]; });
return *cur != refutations[0] && *cur != refutations[1] && *cur != refutations[2];
});
return Move::none(); return Move::none();

View file

@ -185,7 +185,7 @@ class MovePicker {
const PieceToHistory** continuationHistory; const PieceToHistory** continuationHistory;
const PawnHistory* pawnHistory; const PawnHistory* pawnHistory;
Move ttMove; Move ttMove;
ExtMove refutations[3], *cur, *endMoves, *endBadCaptures, *beginBadQuiets, *endBadQuiets; ExtMove refutations[2], *cur, *endMoves, *endBadCaptures, *beginBadQuiets, *endBadQuiets;
int stage; int stage;
int threshold; int threshold;
Depth depth; Depth depth;