1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23: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]];
case GOOD_QUIET :
if (!skipQuiets && select<Next>([&]() {
return *cur != refutations[0] && *cur != refutations[1] && *cur != refutations[2];
}))
if (!skipQuiets
&& select<Next>([&]() { return *cur != refutations[0] && *cur != refutations[1]; }))
{
if ((cur - 1)->value > -7998 || (cur - 1)->value <= quiet_threshold(depth))
return *(cur - 1);
@ -328,9 +327,7 @@ top:
case BAD_QUIET :
if (!skipQuiets)
return select<Next>([&]() {
return *cur != refutations[0] && *cur != refutations[1] && *cur != refutations[2];
});
return select<Next>([&]() { return *cur != refutations[0] && *cur != refutations[1]; });
return Move::none();

View file

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