]> git.sesse.net Git - stockfish/commitdiff
remove unnecessary variable
authorDisservin <disservin.social@gmail.com>
Sat, 4 Feb 2023 13:16:58 +0000 (14:16 +0100)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Thu, 9 Feb 2023 06:42:52 +0000 (07:42 +0100)
pinned already has to be true for the bitwise &

closes https://github.com/official-stockfish/Stockfish/pull/4381

No functional change

src/movegen.cpp

index 471541644a0cf1e82b37f4bc19ddfe1a3b87698f..255dce04c3c136d0e836d62de22a37d873f05f90 100644 (file)
@@ -264,7 +264,7 @@ ExtMove* generate<LEGAL>(const Position& pos, ExtMove* moveList) {
   moveList = pos.checkers() ? generate<EVASIONS    >(pos, moveList)
                             : generate<NON_EVASIONS>(pos, moveList);
   while (cur != moveList)
-      if (  ((pinned && pinned & from_sq(*cur)) || from_sq(*cur) == ksq || type_of(*cur) == EN_PASSANT)
+      if (  ((pinned & from_sq(*cur)) || from_sq(*cur) == ksq || type_of(*cur) == EN_PASSANT)
           && !pos.legal(*cur))
           *cur = (--moveList)->move;
       else