- mlist = generate_castling< KING_SIDE, Checks, false>(pos, mlist, Us);
- mlist = generate_castling<QUEEN_SIDE, Checks, false>(pos, mlist, Us);
+ mlist = generate_castling<MakeCastling<Us, KING_SIDE>::flag, Checks, false>(pos, mlist, Us, ci);
+ mlist = generate_castling<MakeCastling<Us, QUEEN_SIDE>::flag, Checks, false>(pos, mlist, Us, ci);