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

max_piece_type cleanup, and slight speed increase.

No functional change.

Resolves #81
This commit is contained in:
mstembera 2014-10-28 22:23:01 +08:00 committed by Gary Linscott
parent 7d42752158
commit 5605cc7684

View file

@ -499,12 +499,11 @@ namespace {
assert(target & (pos.pieces(C) ^ pos.pieces(C, KING))); assert(target & (pos.pieces(C) ^ pos.pieces(C, KING)));
PieceType pt; for (PieceType pt = QUEEN; pt > PAWN; --pt)
for (pt = QUEEN; pt > PAWN; --pt)
if (target & pos.pieces(C, pt)) if (target & pos.pieces(C, pt))
return pt; return pt;
return pt; return PAWN;
} }