Replace make_square() with operator|(File, Rank)

Be fancy :-)

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-06-23 08:49:33 +01:00
parent 9c7e2c8f9d
commit 5f5d056c8f
7 changed files with 20 additions and 20 deletions

View File

@@ -977,7 +977,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
while (b)
{
s = pop_1st_bit(&b);
queeningSquare = relative_square(c, make_square(file_of(s), RANK_8));
queeningSquare = relative_square(c, file_of(s) | RANK_8);
queeningPath = forward_bb(c, s);
// Compute plies to queening and check direct advancement
@@ -1020,7 +1020,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
s = pop_1st_bit(&b);
// Compute plies from queening
queeningSquare = relative_square(loserSide, make_square(file_of(s), RANK_8));
queeningSquare = relative_square(loserSide, file_of(s) | RANK_8);
movesToGo = rank_distance(s, queeningSquare) - int(relative_rank(loserSide, s) == RANK_2);
pliesToGo = 2 * movesToGo - int(loserSide == pos.side_to_move());
@@ -1044,7 +1044,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
minKingDist = kingptg = 256;
// Compute plies from queening
queeningSquare = relative_square(loserSide, make_square(file_of(s), RANK_8));
queeningSquare = relative_square(loserSide, file_of(s) | RANK_8);
movesToGo = rank_distance(s, queeningSquare) - int(relative_rank(loserSide, s) == RANK_2);
pliesToGo = 2 * movesToGo - int(loserSide == pos.side_to_move());