]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Use std::count in pos_is_ok()
[stockfish] / src / position.h
index baf49705db7a6e00034a9ed9f561f267fda9b9cc..4aa0efb60bfb4998de0d33d7148f4ab5bfca5110 100644 (file)
@@ -292,7 +292,7 @@ inline Square Position::castling_rook_square(CastlingRight cr) const {
 template<PieceType Pt>
 inline Bitboard Position::attacks_from(Square s) const {
 
-  return  Pt == BISHOP || Pt == ROOK ? attacks_bb<Pt>(s, pieces())
+  return  Pt == BISHOP || Pt == ROOK ? attacks_bb<Pt>(s, byTypeBB[ALL_PIECES])
         : Pt == QUEEN  ? attacks_from<ROOK>(s) | attacks_from<BISHOP>(s)
         : StepAttacksBB[Pt][s];
 }