mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 03:57:45 +00:00
max_piece_type cleanup, and slight speed increase.
No functional change. Resolves #81
This commit is contained in:
+2
-3
@@ -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