]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Fix a warning under Intel compiler in square.h
[stockfish] / src / evaluate.cpp
index f654b515ef361b2cd7fe11e54ec1c1a05186af34..c29fd5e651a46bd5a46af414b256f2923f6a029d 100644 (file)
@@ -490,7 +490,10 @@ void init_eval(int threads) {
   }
 
   for (Bitboard b = 0ULL; b < 256ULL; b++)
-      BitCount8Bit[b] = count_1s(b);
+  {
+      assert(count_1s(b) == int(uint8_t(count_1s(b))));
+      BitCount8Bit[b] = (uint8_t)count_1s(b);
+  }
 }
 
 
@@ -779,7 +782,7 @@ namespace {
                         if (    bit_is_set(p.piece_attacks<QUEEN>(from), to)
                             && !bit_is_set(p.pinned_pieces(them), from)
                             && !(rook_attacks_bb(to, occ & ClearMaskBB[from]) & p.rooks_and_queens(us))
-                            && !(rook_attacks_bb(to, occ & ClearMaskBB[from]) & p.rooks_and_queens(us)))
+                            && !(bishop_attacks_bb(to, occ & ClearMaskBB[from]) & p.bishops_and_queens(us)))
 
                             ei.mateThreat[them] = make_move(from, to);
                     }