]> git.sesse.net Git - stockfish/commitdiff
Retire mirror()
authorMarco Costalba <mcostalba@gmail.com>
Thu, 24 Oct 2013 18:38:02 +0000 (20:38 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 24 Oct 2013 18:40:26 +0000 (20:40 +0200)
Inline the only caller site.

No functional change.

src/endgame.cpp
src/types.h

index e52f9939e3eea38180315735578cfc40ab7c5b97..6ead680b3d25f3f9aac5e895fb8c6de924f87ffc 100644 (file)
@@ -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;
index 26de44e12ea5b9a726d7d449b998ce39728bab61..bcf3da5ccb0ed34de85d878cbeea6f41a8c756ae 100644 (file)
@@ -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));
 }