mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Retire mirror()
Inline the only caller site. No functional change.
This commit is contained in:
parent
281472e50e
commit
48f38f3092
2 changed files with 1 additions and 5 deletions
|
@ -72,7 +72,7 @@ namespace {
|
||||||
assert(pos.count<PAWN>(strongSide) == 1);
|
assert(pos.count<PAWN>(strongSide) == 1);
|
||||||
|
|
||||||
if (file_of(pos.list<PAWN>(strongSide)[0]) >= FILE_E)
|
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)
|
if (strongSide == BLACK)
|
||||||
sq = ~sq;
|
sq = ~sq;
|
||||||
|
|
|
@ -371,10 +371,6 @@ inline Rank rank_of(Square s) {
|
||||||
return Rank(s >> 3);
|
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) {
|
inline Square relative_square(Color c, Square s) {
|
||||||
return Square(s ^ (c * 56));
|
return Square(s ^ (c * 56));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue