mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Remove redundant condition from capture_stage()
Change a non functional promotion check to an assert. closes https://github.com/official-stockfish/Stockfish/pull/4436 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
d1e17989b5
commit
7077fbdd14
@@ -393,7 +393,7 @@ inline bool Position::capture(Move m) const {
|
||||
// is needed to avoid the generation of duplicate moves.
|
||||
inline bool Position::capture_stage(Move m) const {
|
||||
assert(is_ok(m));
|
||||
return capture(m) || (type_of(m) == PROMOTION && promotion_type(m) == QUEEN);
|
||||
return capture(m) || promotion_type(m) == QUEEN;
|
||||
}
|
||||
|
||||
inline Piece Position::captured_piece() const {
|
||||
|
||||
Reference in New Issue
Block a user