From 11ee391206156ab7fe5ef06a40eac8b73bfd6e8a Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sun, 20 Dec 2020 09:44:34 +0800 Subject: [PATCH] bb: Do not use popcount --- src/position.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/position.cpp b/src/position.cpp index 733f2556..0162db57 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1597,7 +1597,7 @@ int Position::in_how_many_mills(Square s, Color c, Square squareSelected) board[millTable[s][l][0]] & board[millTable[s][l][1]]; #else - bool b = popcount(byColorBB[c] & millTableBB[s][l]) == (3 - 1); + bool b = (millTableBB[s][l] && ((byColorBB[c] & millTableBB[s][l]) == millTableBB[s][l])); #endif if (b) { @@ -1660,7 +1660,7 @@ int Position::add_mills(Square s) } #else // no mill - if (popcount(byColorBB[m] & millTableBB[s][i]) < (3 - 1)) { + if (millTableBB[s][i] == 0 || ((byColorBB[m] & millTableBB[s][i]) != millTableBB[s][i])) { continue; } #endif