]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Remove BlockedStorm array
[stockfish] / src / evaluate.cpp
index 613f8926e7631a022d3692a070ee59a84b4c3fd8..9ebd8748d4759b56bd20c952c0b2922d8c37ea9c 100644 (file)
@@ -258,6 +258,8 @@ namespace {
     attackedBy[Us][ALL_PIECES] = attackedBy[Us][KING] | attackedBy[Us][PAWN];
     attackedBy2[Us]            = attackedBy[Us][KING] & attackedBy[Us][PAWN];
 
+    kingRing[Us] = kingAttackersCount[Them] = 0;
+
     // Init our king safety tables only if we are going to use them
     if (pos.non_pawn_material(Them) >= RookValueMg + KnightValueMg)
     {
@@ -274,8 +276,6 @@ namespace {
         kingAttackersCount[Them] = popcount(kingRing[Us] & pe->pawn_attacks(Them));
         kingAttacksCount[Them] = kingAttackersWeight[Them] = 0;
     }
-    else
-        kingRing[Us] = kingAttackersCount[Them] = 0;
   }