@@ -67,7 +67,7 @@ namespace {
6767 constexpr Color Them = (Us == WHITE ? BLACK : WHITE);
6868 constexpr Direction Up = (Us == WHITE ? NORTH : SOUTH);
6969
70- Bitboard b, neighbours, stoppers, doubled, supported , phalanx;
70+ Bitboard b, neighbours, stoppers, doubled, support , phalanx;
7171 Bitboard lever, leverPush;
7272 Square s;
7373 bool opposed, backward;
@@ -102,7 +102,7 @@ namespace {
102102 doubled = ourPawns & (s - Up);
103103 neighbours = ourPawns & adjacent_files_bb (f);
104104 phalanx = neighbours & rank_bb (s);
105- supported = neighbours & rank_bb (s - Up);
105+ support = neighbours & rank_bb (s - Up);
106106
107107 // A pawn is backward when it is behind all pawns of the same color
108108 // on the adjacent files and cannot be safely advanced.
@@ -114,30 +114,30 @@ namespace {
114114 // which could become passed after one or two pawn pushes when are
115115 // not attacked more times than defended.
116116 if ( !(stoppers ^ lever ^ leverPush)
117- && popcount (supported ) >= popcount (lever) - 1
117+ && popcount (support ) >= popcount (lever) - 1
118118 && popcount (phalanx) >= popcount (leverPush))
119119 e->passedPawns [Us] |= s;
120120
121121 else if ( stoppers == SquareBB[s + Up]
122122 && relative_rank (Us, s) >= RANK_5)
123123 {
124- b = shift<Up>(supported ) & ~theirPawns;
124+ b = shift<Up>(support ) & ~theirPawns;
125125 while (b)
126126 if (!more_than_one (theirPawns & PawnAttacks[Us][pop_lsb (&b)]))
127127 e->passedPawns [Us] |= s;
128128 }
129129
130130 // Score this pawn
131- if (supported | phalanx)
132- score += Connected[opposed][bool (phalanx)][popcount (supported )][relative_rank (Us, s)];
131+ if (support | phalanx)
132+ score += Connected[opposed][bool (phalanx)][popcount (support )][relative_rank (Us, s)];
133133
134134 else if (!neighbours)
135135 score -= Isolated, e->weakUnopposed [Us] += !opposed;
136136
137137 else if (backward)
138138 score -= Backward, e->weakUnopposed [Us] += !opposed;
139139
140- if (doubled && !supported )
140+ if (doubled && !support )
141141 score -= Doubled;
142142 }
143143
@@ -214,10 +214,10 @@ Value Entry::evaluate_shelter(const Position& pos, Square ksq) {
214214 for (File f = File (center - 1 ); f <= File (center + 1 ); ++f)
215215 {
216216 b = ourPawns & file_bb (f);
217- int ourRank = b ? relative_rank (Us, backmost_sq (Us, b)) : 0 ;
217+ Rank ourRank = b ? relative_rank (Us, backmost_sq (Us, b)) : RANK_1 ;
218218
219219 b = theirPawns & file_bb (f);
220- int theirRank = b ? relative_rank (Us, frontmost_sq (Them, b)) : 0 ;
220+ Rank theirRank = b ? relative_rank (Us, frontmost_sq (Them, b)) : RANK_1 ;
221221
222222 int d = std::min (f, ~f);
223223 safety += ShelterStrength[d][ourRank];
@@ -237,7 +237,7 @@ Score Entry::do_king_safety(const Position& pos) {
237237
238238 Square ksq = pos.square <KING>(Us);
239239 kingSquares[Us] = ksq;
240- castlingRights[Us] = pos.can_castle (Us);
240+ castlingRights[Us] = pos.castling_rights (Us);
241241 int minKingPawnDistance = 0 ;
242242
243243 Bitboard pawns = pos.pieces (Us, PAWN);
0 commit comments