Skip to content

Commit

Permalink
Retire mirror()
Browse files Browse the repository at this point in the history
Inline the only caller site.

No functional change.
  • Loading branch information
mcostalba committed Oct 24, 2013
1 parent 281472e commit 48f38f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/endgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace {
assert(pos.count<PAWN>(strongSide) == 1);

if (file_of(pos.list<PAWN>(strongSide)[0]) >= FILE_E)
sq = mirror(sq);
sq = Square(sq ^ 7); // Mirror SQ_H1 -> SQ_A1

if (strongSide == BLACK)
sq = ~sq;
Expand Down
4 changes: 0 additions & 4 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,6 @@ inline Rank rank_of(Square s) {
return Rank(s >> 3);
}

inline Square mirror(Square s) {
return Square(s ^ 7); // Horizontal flip SQ_A1 -> SQ_H1
}

inline Square relative_square(Color c, Square s) {
return Square(s ^ (c * 56));
}
Expand Down

0 comments on commit 48f38f3

Please sign in to comment.