X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=0f6a3febeb98d92a8e50232fcb16df4e1bd98716;hp=12485fbb780fb64026e359bc97cdd271ea9c2599;hb=c2600a73cfcde2958351bf7fd4dc7296b137223b;hpb=c6f497f09de59ce4889c2045e0e4b6efb3082899 diff --git a/src/position.cpp b/src/position.cpp index 12485fbb..0f6a3feb 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "bitcount.h" #include "movegen.h" @@ -223,7 +224,7 @@ void Position::from_fen(const string& fenStr, bool isChess960) { // Convert from fullmove starting from 1 to ply starting from 0, // handle also common incorrect FEN with fullmove = 0. - startPosPly = Max(2 * (startPosPly - 1), 0) + int(sideToMove == BLACK); + startPosPly = std::max(2 * (startPosPly - 1), 0) + int(sideToMove == BLACK); st->key = compute_key(); st->pawnKey = compute_pawn_key(); @@ -1330,7 +1331,7 @@ int Position::see(Move m) const { // Having built the swap list, we negamax through it to find the best // achievable score from the point of view of the side to move. while (--slIndex) - swapList[slIndex-1] = Min(-swapList[slIndex], swapList[slIndex-1]); + swapList[slIndex-1] = std::min(-swapList[slIndex], swapList[slIndex-1]); return swapList[0]; } @@ -1502,7 +1503,7 @@ bool Position::is_draw() const { // Draw by repetition? if (!SkipRepetition) { - int i = 4, e = Min(st->rule50, st->pliesFromNull); + int i = 4, e = std::min(st->rule50, st->pliesFromNull); if (i <= e) {