]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Rename getters functions removing 'get_' prefix
[stockfish] / src / pawns.cpp
index d5514e2eaea411e474e1802230ac1da2985ec95b..2906b0453b3c8508ddeb3ce129a00152d9a5b1cd 100644 (file)
@@ -72,14 +72,14 @@ namespace {
 }
 
 
-/// PawnInfoTable::get_pawn_info() takes a position object as input, computes
+/// PawnInfoTable::pawn_info() takes a position object as input, computes
 /// a PawnInfo object, and returns a pointer to it. The result is also stored
 /// in an hash table, so we don't have to recompute everything when the same
 /// pawn structure occurs again.
 
-PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) const {
+PawnInfo* PawnInfoTable::pawn_info(const Position& pos) const {
 
-  Key key = pos.get_pawn_key();
+  Key key = pos.pawn_key();
   PawnInfo* pi = probe(key);
 
   // If pi->key matches the position's pawn hash key, it means that we
@@ -182,7 +182,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
       // pawn on neighboring files is higher or equal than the number of
       // enemy pawns in the forward direction on the neighboring files.
       candidate =   !(opposed | passed | backward | isolated)
-                 && (b = attack_span_mask(Them, s + pawn_push(Us)) & ourPawns) != EmptyBoardBB
+                 && (b = attack_span_mask(Them, s + pawn_push(Us)) & ourPawns) != 0
                  &&  count_1s<Max15>(b) >= count_1s<Max15>(attack_span_mask(Us, s) & theirPawns);
 
       // Passed pawns will be properly scored in evaluation because we need