X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmove.h;h=d70bb81e77b1e4417633994175c896b94e243f11;hb=ad44ff2bca7a4e919ce8375cda95ec849e63ef60;hp=844ec1f6be609d198be1b656630e55eaf327a387;hpb=cf4df0327a3f30be345b0e9685b095be79e47cae;p=stockfish diff --git a/src/move.h b/src/move.h index 844ec1f6..d70bb81e 100644 --- a/src/move.h +++ b/src/move.h @@ -73,7 +73,7 @@ inline void sort_moves(T* firstMove, T* lastMove) T *cur, *p, *d; if (firstMove != lastMove) - for (cur = firstMove; ++cur != lastMove; ) + for (cur = firstMove + 1; cur != lastMove; cur++) { p = d = cur; value = *p--; @@ -123,6 +123,10 @@ inline PieceType move_promotion_piece(Move m) { return PieceType((int(m) >> 12) & 7); } +inline int move_is_special(Move m) { + return m & (0x1F << 12); +} + inline int move_is_promotion(Move m) { return m & (7 << 12); }