From 48f38f3092626f0dfef3728568ad5d85ca6c2f92 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 24 Oct 2013 20:38:02 +0200 Subject: [PATCH] Retire mirror() Inline the only caller site. No functional change. --- src/endgame.cpp | 2 +- src/types.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) 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)); } -- 2.39.2