]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Silence a good bunch of Intel warnings
[stockfish] / src / position.cpp
index 45be5df3203b26a0c4fe5ffccb25468033692ba0..b8f7807b68aa5eb225a5b3aabcee248e6c5f06fb 100644 (file)
@@ -1854,15 +1854,14 @@ Value Position::compute_value() const {
 Value Position::compute_non_pawn_material(Color c) const {
 
   Value result = Value(0);
-  Square s;
 
   for (PieceType pt = KNIGHT; pt <= QUEEN; pt++)
   {
       Bitboard b = pieces_of_color_and_type(c, pt);
-      while(b)
+      while (b)
       {
-          s = pop_1st_bit(&b);
-          assert(piece_on(s) == piece_of_color_and_type(c, pt));
+          assert(piece_on(first_1(b)) == piece_of_color_and_type(c, pt));
+          pop_1st_bit(&b);
           result += piece_value_midgame(pt);
       }
   }