1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Indentation fix in index()

No functional change.

Closes #1158
This commit is contained in:
Marco Costalba 2017-07-01 07:58:38 +02:00 committed by Joona Kiiski
parent 6d24ef8585
commit c0cb713a00
2 changed files with 11 additions and 10 deletions

View file

@ -251,6 +251,7 @@ namespace {
void init_magics(Bitboard table[], Magic magics[], Square deltas[]) {
// Optimal PRNG seeds to pick the correct magics in the shortest time
int seeds[][RANK_NB] = { { 8977, 44560, 54343, 38998, 5731, 95205, 104912, 17020 },
{ 728, 10316, 55013, 32803, 12281, 15100, 16645, 255 } };

View file

@ -83,7 +83,7 @@ struct Magic {
Bitboard* attacks;
unsigned shift;
/// looks up the index using the 'magic bitboards' approach.
// Compute the attack's index using the 'magic bitboards' approach
unsigned index(Bitboard occupied) const {
if (HasPext)
@ -241,8 +241,8 @@ template<> inline int distance<Rank>(Square x, Square y) { return distance(rank_
template<PieceType Pt>
inline Bitboard attacks_bb(Square s, Bitboard occupied) {
const Magic& M = Pt == ROOK ? RookMagics[s] : BishopMagics[s];
return M.attacks[M.index(occupied)];
const Magic& m = Pt == ROOK ? RookMagics[s] : BishopMagics[s];
return m.attacks[m.index(occupied)];
}
inline Bitboard attacks_bb(PieceType pt, Square s, Bitboard occupied) {