static_assert(Type == CAPTURES || Type == QUIETS || Type == EVASIONS, "Wrong type");
- Bitboard threatened, threatenedByPawn, threatenedByMinor, threatenedByRook;
+ [[maybe_unused]] Bitboard threatened, threatenedByPawn, threatenedByMinor, threatenedByRook;
if constexpr (Type == QUIETS)
{
Color us = pos.side_to_move();
| (pos.pieces(us, ROOK) & threatenedByMinor)
| (pos.pieces(us, KNIGHT, BISHOP) & threatenedByPawn);
}
- else
- {
- // Silence unused variable warnings
- (void) threatened;
- (void) threatenedByPawn;
- (void) threatenedByMinor;
- (void) threatenedByRook;
- }
for (auto& m : *this)
if constexpr (Type == CAPTURES)