X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=7dcbb6f479ab91302e964e50de4c64cae5936e65;hp=de2afbfd95cb2182cce382588328d56e5030564b;hb=ad0fdf0da6d9fdc38a5ceb96eeed0d79c8e38dc9;hpb=4dc7ba16191bd1ded7c8257afd2a3b9194cebca8 diff --git a/src/position.h b/src/position.h index de2afbfd..7dcbb6f4 100644 --- a/src/position.h +++ b/src/position.h @@ -20,6 +20,8 @@ #if !defined(POSITION_H_INCLUDED) #define POSITION_H_INCLUDED +#include + #include "bitboard.h" #include "move.h" #include "types.h" @@ -211,7 +213,6 @@ public: void undo_null_move(); // Static exchange evaluation - int see(Square from, Square to) const; int see(Move m) const; int see_sign(Move m) const; @@ -525,13 +526,13 @@ inline bool Position::is_chess960() const { inline bool Position::move_is_capture(Move m) const { - // Move must not be MOVE_NONE ! + assert (m != MOVE_NONE && m != MOVE_NULL); return (m & (3 << 15)) ? !move_is_castle(m) : !square_is_empty(move_to(m)); } inline bool Position::move_is_capture_or_promotion(Move m) const { - // Move must not be MOVE_NONE ! + assert (m != MOVE_NONE && m != MOVE_NULL); return (m & (0x1F << 12)) ? !move_is_castle(m) : !square_is_empty(move_to(m)); }