X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=6171c70a9ab62c38b7df4ae316755bbafd0dea07;hp=7ad5dc47e891b57a4d9717ee1a793dba3bb8d3a2;hb=369789b426f1cb63a8855c131855a2e37bc61846;hpb=6963c3802d73c61396af32eb7fc6a4e4a76763ae diff --git a/src/material.cpp b/src/material.cpp index 7ad5dc47..6171c70a 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -19,6 +19,7 @@ #include #include +#include #include "material.h" @@ -203,13 +204,13 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) const { if (pos.piece_count(WHITE, PAWN) == 0 && npm_w - npm_b <= BishopValueMidgame) { mi->factor[WHITE] = uint8_t - (npm_w == npm_b || npm_w < RookValueMidgame ? 0 : NoPawnsSF[Min(pos.piece_count(WHITE, BISHOP), 2)]); + (npm_w == npm_b || npm_w < RookValueMidgame ? 0 : NoPawnsSF[std::min(pos.piece_count(WHITE, BISHOP), 2)]); } if (pos.piece_count(BLACK, PAWN) == 0 && npm_b - npm_w <= BishopValueMidgame) { mi->factor[BLACK] = uint8_t - (npm_w == npm_b || npm_b < RookValueMidgame ? 0 : NoPawnsSF[Min(pos.piece_count(BLACK, BISHOP), 2)]); + (npm_w == npm_b || npm_b < RookValueMidgame ? 0 : NoPawnsSF[std::min(pos.piece_count(BLACK, BISHOP), 2)]); } // Compute the space weight