Retire operator|(File f, Rank r)

Use make_square() instead. Less fancy but
more clear.

No functional change.
This commit is contained in:
Marco Costalba
2014-03-22 23:35:30 +01:00
parent 4eee603433
commit 5f12069cbf
6 changed files with 17 additions and 17 deletions

View File

@@ -337,10 +337,6 @@ inline Square operator~(Square s) {
return Square(s ^ SQ_A8); // Vertical flip SQ_A1 -> SQ_A8
}
inline Square operator|(File f, Rank r) {
return Square((r << 3) | f);
}
inline CastlingRight operator|(Color c, CastlingSide s) {
return CastlingRight(WHITE_OO << ((s == QUEEN_SIDE) + 2 * c));
}
@@ -353,6 +349,10 @@ inline Value mated_in(int ply) {
return -VALUE_MATE + ply;
}
inline Square make_square(File f, Rank r) {
return Square((r << 3) | f);
}
inline Piece make_piece(Color c, PieceType pt) {
return Piece((c << 3) | pt);
}