From: Marco Costalba Date: Thu, 24 Oct 2013 18:38:02 +0000 (+0200) Subject: Retire mirror() X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=48f38f3092626f0dfef3728568ad5d85ca6c2f92;p=stockfish Retire mirror() Inline the only caller site. No functional change. --- diff --git a/src/endgame.cpp b/src/endgame.cpp index e52f9939..6ead680b 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -72,7 +72,7 @@ namespace { assert(pos.count(strongSide) == 1); if (file_of(pos.list(strongSide)[0]) >= FILE_E) - sq = mirror(sq); + sq = Square(sq ^ 7); // Mirror SQ_H1 -> SQ_A1 if (strongSide == BLACK) sq = ~sq; diff --git a/src/types.h b/src/types.h index 26de44e1..bcf3da5c 100644 --- a/src/types.h +++ b/src/types.h @@ -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)); }