X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.cpp;h=3597e7d830fe4d79cc0f1da4ebce5bbb78748548;hp=19599a5124bdc54cf4e93a9b77c2b02a45a62b39;hb=b71418defa4e7b0475fe9e16afdfdfefeab31e0f;hpb=47b89f2e3717d59e9245b69fb33d51e749f71794 diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 19599a51..3597e7d8 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -155,11 +155,8 @@ void Bitboards::init() { while (k < (2 << i)) MS1BTable[k++] = i; - for (int i = 0; i < 64; ++i) - BSFTable[bsf_index(1ULL << i)] = Square(i); - for (Square s = SQ_A1; s <= SQ_H8; ++s) - SquareBB[s] = 1ULL << s; + BSFTable[bsf_index(SquareBB[s] = 1ULL << s)] = s; FileBB[FILE_A] = FileABB; RankBB[RANK_1] = Rank1BB;