From 2be17e04bdd660c1af1edca4aa52f942c9f25d40 Mon Sep 17 00:00:00 2001 From: rainrat Date: Tue, 13 Feb 2024 01:14:10 -0800 Subject: [PATCH] include sign optimization --- src/position.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/position.cpp b/src/position.cpp index 64136b40a..c449b6a94 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -2865,7 +2865,7 @@ bool Position::is_immediate_game_end(Value& result, int ply) const { int total_count = 1; // Start with the current piece // Check in both directions - for (int sign = -1; sign <= 1; sign += 2) { + for (int sign : {-1, 1}) { Bitboard shifted = shift(sign * d, square_bb(s)); while (shifted) { if (shifted & b) {