X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=7c4efa3cb425dfe4717c12e7ff1b26c039f730f6;hp=3e572205970d63cba9da91421e81bd291cf5e36c;hb=bf6b647a1afd0bfa25ee627622824a3ecb666c5d;hpb=badb2aca44d6507f35dafc8b5c3921a6649a40f8
diff --git a/src/endgame.cpp b/src/endgame.cpp
index 3e572205..7c4efa3c 100644
--- a/src/endgame.cpp
+++ b/src/endgame.cpp
@@ -18,7 +18,6 @@
along with this program. If not, see .
*/
-#include
#include
#include "bitboard.h"
@@ -77,15 +76,39 @@ namespace {
if (file_of(pos.square(strongSide)) >= FILE_E)
sq = Square(sq ^ 7); // Mirror SQ_H1 -> SQ_A1
- if (strongSide == BLACK)
- sq = ~sq;
-
- return sq;
+ return strongSide == WHITE ? sq : ~sq;
}
} // namespace
+namespace Endgames {
+
+ std::pair