]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Second take at unifying bitboard representation access
[stockfish] / src / pawns.cpp
index 1d8b082ed449cb55281054b156721ba79deeaf42..71b1738cc253f8b3b5bafc215d7d160ea71c8c01 100644 (file)
@@ -197,8 +197,8 @@ PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) {
   for (Color us = WHITE; us <= BLACK; us++)
   {
     Color them = opposite_color(us);
-    Bitboard ourPawns = pos.pieces<PAWN>(us);
-    Bitboard theirPawns = pos.pieces<PAWN>(them);
+    Bitboard ourPawns = pos.pieces(PAWN, us);
+    Bitboard theirPawns = pos.pieces(PAWN, them);
     Bitboard pawns = ourPawns;
 
     // Initialize pawn storm scores by giving bonuses for open files
@@ -392,7 +392,7 @@ PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) {
 int PawnInfo::updateShelter(const Position& pos, Color c, Square ksq) {
 
   unsigned shelter = 0;
-  Bitboard pawns = pos.pieces<PAWN>(c) & this_and_neighboring_files_bb(ksq);
+  Bitboard pawns = pos.pieces(PAWN, c) & this_and_neighboring_files_bb(ksq);
   unsigned r = ksq & (7 << 3);
   for (int i = 1, k = (c ? -8 : 8); i < 4; i++)
   {