mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
max_piece_type cleanup, and slight speed increase.
No functional change. Resolves #81
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user