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:
parent
7d42752158
commit
5605cc7684
1 changed files with 2 additions and 3 deletions
|
@ -499,12 +499,11 @@ namespace {
|
|||
|
||||
assert(target & (pos.pieces(C) ^ pos.pieces(C, KING)));
|
||||
|
||||
PieceType pt;
|
||||
for (pt = QUEEN; pt > PAWN; --pt)
|
||||
for (PieceType pt = QUEEN; pt > PAWN; --pt)
|
||||
if (target & pos.pieces(C, pt))
|
||||
return pt;
|
||||
|
||||
return pt;
|
||||
return PAWN;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue