Retire in_front_bb(Color c, Square s) overload

Explciitly call rank_of() in the few places where
it is used.

No functional change.
This commit is contained in:
Marco Costalba
2013-06-23 10:16:43 +02:00
parent b2fadf32aa
commit a4c11b71ac
4 changed files with 8 additions and 13 deletions
+2 -2
View File
@@ -704,7 +704,7 @@ ScaleFactor Endgame<KPsK>::operator()(const Position& pos) const {
// Does the defending king block the pawns?
if ( square_distance(ksq, relative_square(strongerSide, SQ_A8)) <= 1
|| ( file_of(ksq) == FILE_A
&& !(in_front_bb(strongerSide, ksq) & pawns)))
&& !(in_front_bb(strongerSide, rank_of(ksq)) & pawns)))
return SCALE_FACTOR_DRAW;
}
// Are all pawns on the 'h' file?
@@ -713,7 +713,7 @@ ScaleFactor Endgame<KPsK>::operator()(const Position& pos) const {
// Does the defending king block the pawns?
if ( square_distance(ksq, relative_square(strongerSide, SQ_H8)) <= 1
|| ( file_of(ksq) == FILE_H
&& !(in_front_bb(strongerSide, ksq) & pawns)))
&& !(in_front_bb(strongerSide, rank_of(ksq)) & pawns)))
return SCALE_FACTOR_DRAW;
}
return SCALE_FACTOR_NONE;