1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Another generate_piece_moves() micro optimization

This time on the for loop.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-10-23 09:47:00 +02:00
parent 5e768e4b0a
commit af5743837d

View file

@ -576,7 +576,7 @@ namespace {
Square from, to;
Bitboard b;
for (int i = 0; i < pos.piece_count(us, Piece); i++)
for (int i = 0, e = pos.piece_count(us, Piece); i < e; i++)
{
from = pos.piece_list(us, Piece, i);
b = pos.piece_attacks<Piece>(from) & target;