X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=59de12886e513f55b6ba2ffae18cfe4ce96986bd;hp=404178dcc4b73f2c7e564b173c637c3d29ba29b9;hb=500fff920ba6b27674835d3ca9276c70c2e76475;hpb=6d665b7f78d03ef7c15d7964b28dccd6b6826adf diff --git a/src/bitboard.h b/src/bitboard.h index 404178dc..59de1288 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -60,12 +60,12 @@ extern Bitboard SquaresInFrontMask[2][64]; extern Bitboard PassedPawnMask[2][64]; extern Bitboard AttackSpanMask[2][64]; -extern const uint64_t RMult[64]; +extern uint64_t RMult[64]; extern int RShift[64]; extern Bitboard RMask[64]; extern Bitboard* RAttacks[64]; -extern const uint64_t BMult[64]; +extern uint64_t BMult[64]; extern int BShift[64]; extern Bitboard BMask[64]; extern Bitboard* BAttacks[64]; @@ -113,7 +113,7 @@ inline Bitboard rank_bb(Rank r) { } inline Bitboard rank_bb(Square s) { - return RankBB[square_rank(s)]; + return RankBB[rank_of(s)]; } inline Bitboard file_bb(File f) { @@ -121,7 +121,7 @@ inline Bitboard file_bb(File f) { } inline Bitboard file_bb(Square s) { - return FileBB[square_file(s)]; + return FileBB[file_of(s)]; } @@ -133,7 +133,7 @@ inline Bitboard neighboring_files_bb(File f) { } inline Bitboard neighboring_files_bb(Square s) { - return NeighboringFilesBB[square_file(s)]; + return NeighboringFilesBB[file_of(s)]; } @@ -145,7 +145,7 @@ inline Bitboard this_and_neighboring_files_bb(File f) { } inline Bitboard this_and_neighboring_files_bb(Square s) { - return ThisAndNeighboringFilesBB[square_file(s)]; + return ThisAndNeighboringFilesBB[file_of(s)]; } @@ -160,7 +160,7 @@ inline Bitboard in_front_bb(Color c, Rank r) { } inline Bitboard in_front_bb(Color c, Square s) { - return InFrontBB[c][square_rank(s)]; + return InFrontBB[c][rank_of(s)]; } @@ -245,7 +245,7 @@ inline Bitboard attack_span_mask(Color c, Square s) { inline bool squares_aligned(Square s1, Square s2, Square s3) { return (BetweenBB[s1][s2] | BetweenBB[s1][s3] | BetweenBB[s2][s3]) - & ((1ULL << s1) | (1ULL << s2) | (1ULL << s3)); + & ( SetMaskBB[s1] | SetMaskBB[s2] | SetMaskBB[s3]); }