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

Update piece list iteration also in evaluate_pieces()

Move to what we already do in generate_piece_moves()

This simple patch gives a spped up of 1.4% !!

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-09-26 07:14:12 +02:00
parent 6bf22f354f
commit 91f0c08789

View file

@ -614,11 +614,10 @@ namespace {
int mob;
File f;
Color them = opposite_color(us);
const Square* ptr = pos.piece_list_begin(us, Piece);
for (int i = 0, e = pos.piece_count(us, Piece); i < e; i++)
while ((s = *ptr++) != SQ_NONE)
{
s = pos.piece_list(us, Piece, i);
if (Piece == KNIGHT || Piece == QUEEN)
b = pos.attacks_from<Piece>(s);
else if (Piece == BISHOP)