X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=dd849c15604813c9ba6acf005d807fa4e508f682;hp=501704ba3f53ffd1566f8be4ff9593750fae9782;hb=9c7d72739cffe523f0ea8c84875160c17ae6ab82;hpb=c2c185423b13b0227c86009c6006e48e8d258896 diff --git a/src/movegen.cpp b/src/movegen.cpp index 501704ba..dd849c15 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -18,6 +18,7 @@ */ #include +#include #include "bitcount.h" #include "movegen.h" @@ -489,7 +490,7 @@ namespace { while (b1) { to = pop_1st_bit(&b1); - (*mlist++).move = make_ep_move(to, pos.ep_square()); + (*mlist++).move = make_enpassant_move(to, pos.ep_square()); } } return mlist; @@ -516,12 +517,12 @@ namespace { // (including the final square), and all the squares between the rook's initial // and final squares (including the final square), must be vacant except for // the king and castling rook. - for (Square s = Min(kfrom, kto); s <= Max(kfrom, kto); s++) + for (Square s = std::min(kfrom, kto); s <= std::max(kfrom, kto); s++) if ( (s != kfrom && s != rfrom && !pos.square_is_empty(s)) ||(pos.attackers_to(s) & pos.pieces(them))) return mlist; - for (Square s = Min(rfrom, rto); s <= Max(rfrom, rto); s++) + for (Square s = std::min(rfrom, rto); s <= std::max(rfrom, rto); s++) if (s != kfrom && s != rfrom && !pos.square_is_empty(s)) return mlist;