Further simplify Bitboards init()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 7 Dec 2013 09:57:05 +0000 (10:57 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 7 Dec 2013 09:57:05 +0000 (10:57 +0100)
No functional change.

src/bitboard.cpp

index 19599a5..3597e7d 100644 (file)
@@ -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;