From: Marco Costalba Date: Sat, 7 Dec 2013 09:57:05 +0000 (+0100) Subject: Further simplify Bitboards init() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=b71418defa4e7b0475fe9e16afdfdfefeab31e0f Further simplify Bitboards init() No functional change. --- 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;