X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=c8c2e6d8c243db77d67b30afd109dfd2ea1fff4f;hp=df8a68f961bf04d4c901621b3519db1568e726ed;hb=281472e50e5685c6667eb7552bbcb2ef5e012d9f;hpb=f011a5af116ed3331c7f6fb36a57d9e6de8a3ae6 diff --git a/src/pawns.cpp b/src/pawns.cpp index df8a68f9..c8c2e6d8 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -232,13 +232,13 @@ Value Entry::shelter_storm(const Position& pos, Square ksq) { Rank rkUs, rkThem; File kf = std::max(FILE_B, std::min(FILE_G, file_of(ksq))); - for (int f = kf - 1; f <= kf + 1; ++f) + for (File f = kf - File(1); f <= kf + File(1); ++f) { - b = ourPawns & FileBB[f]; + b = ourPawns & file_bb(f); rkUs = b ? relative_rank(Us, backmost_sq(Us, b)) : RANK_1; safety -= ShelterWeakness[rkUs]; - b = theirPawns & FileBB[f]; + b = theirPawns & file_bb(f); rkThem = b ? relative_rank(Us, frontmost_sq(Them, b)) : RANK_1; safety -= StormDanger[rkUs == RANK_1 ? 0 : rkThem == rkUs + 1 ? 2 : 1][rkThem]; }