From 6058e7cf60b043cfb142604d0956c32c24098b00 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 18 Jan 2012 17:52:55 +0100 Subject: [PATCH] Triviality in SERIALIZE_PAWNS() macro usage No functional change. Signed-off-by: Marco Costalba --- src/movegen.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/movegen.cpp b/src/movegen.cpp index caf2bfe6..289b51ad 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -29,7 +29,7 @@ /// Version used for pawns, where the 'from' square is given as a delta from the 'to' square #define SERIALIZE_PAWNS(b, d) while (b) { Square to = pop_1st_bit(&b); \ - (*mlist++).move = make_move(to + (d), to); } + (*mlist++).move = make_move(to - (d), to); } namespace { enum CastlingSide { KING_SIDE, QUEEN_SIDE }; @@ -185,8 +185,8 @@ namespace { } } - SERIALIZE_PAWNS(b1, -UP); - SERIALIZE_PAWNS(b2, -UP -UP); + SERIALIZE_PAWNS(b1, UP); + SERIALIZE_PAWNS(b2, UP + UP); } // Promotions and underpromotions @@ -209,8 +209,8 @@ namespace { b1 = move_pawns(pawnsNotOn7) & enemies; b2 = move_pawns(pawnsNotOn7) & enemies; - SERIALIZE_PAWNS(b1, -RIGHT); - SERIALIZE_PAWNS(b2, -LEFT); + SERIALIZE_PAWNS(b1, RIGHT); + SERIALIZE_PAWNS(b2, LEFT); if (pos.ep_square() != SQ_NONE) { -- 2.39.2