Small cleanups

https://github.com/official-stockfish/Stockfish/pull/2584

No functional change.
This commit is contained in:
Joost VandeVondele
2020-03-30 22:45:35 +02:00
parent b7ecdaada7
commit 209e94203f
9 changed files with 37 additions and 43 deletions

View File

@@ -52,7 +52,7 @@ namespace {
template<Color Us, GenType Type>
ExtMove* generate_pawn_moves(const Position& pos, ExtMove* moveList, Bitboard target) {
constexpr Color Them = (Us == WHITE ? BLACK : WHITE);
constexpr Color Them = ~Us;
constexpr Bitboard TRank7BB = (Us == WHITE ? Rank7BB : Rank2BB);
constexpr Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB);
constexpr Direction Up = pawn_push(Us);
@@ -319,7 +319,7 @@ ExtMove* generate<EVASIONS>(const Position& pos, ExtMove* moveList) {
while (sliders)
{
Square checksq = pop_lsb(&sliders);
sliderAttacks |= LineBB[checksq][ksq] ^ checksq;
sliderAttacks |= LineBB[ksq][checksq] ^ checksq;
}
// Generate evasions for king, capture and non capture moves