mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +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)));
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user