Skip to content

Commit 4b50955

Browse files
BM123499snicolet
authored andcommitted
Simplify move generation (1/2)
STC: LLR: 2.95 (-2.94,2.94) {-1.25,0.25} Total: 29792 W: 2611 L: 2545 D: 24636 Ptnml(0-2): 94, 1982, 10659, 2086, 75 https://tests.stockfishchess.org/tests/view/604fe5b62433018de7a38ba8 LTC: LLR: 2.92 (-2.94,2.94) {-0.75,0.25} Total: 22040 W: 826 L: 777 D: 20437 Ptnml(0-2): 8, 646, 9664, 693, 9 https://tests.stockfishchess.org/tests/view/604fec892433018de7a38bac Closes #3399 No functional change
1 parent 9393957 commit 4b50955

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/movegen.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,12 @@ namespace {
182182

183183
Bitboard bb = piecesToMove & pos.pieces(Pt);
184184

185-
if (!bb)
186-
return moveList;
187-
188-
[[maybe_unused]] const Bitboard checkSquares = pos.check_squares(Pt);
189-
190185
while (bb) {
191186
Square from = pop_lsb(&bb);
192187

193188
Bitboard b = attacks_bb<Pt>(from, pos.pieces()) & target;
194189
if constexpr (Checks)
195-
b &= checkSquares;
190+
b &= pos.check_squares(Pt);
196191

197192
while (b)
198193
*moveList++ = make_move(from, pop_lsb(&b));

0 commit comments

Comments
 (0)