]> git.sesse.net Git - stockfish/blobdiff - src/movegen.cpp
Small tweaks in movepick.cpp
[stockfish] / src / movegen.cpp
index c378b6b34ceb5d6f9b87b5d7bb2264028f34755d..f800fdc7c7a64c422688f6944785ce1644b07be3 100644 (file)
@@ -61,7 +61,7 @@ namespace {
 
     (moveList++)->move = m;
 
-    return moveList;
+    return (void)ci, moveList; // Silence a warning under MSVC
   }
 
 
@@ -82,10 +82,8 @@ namespace {
     // that's not already included in the queen promotion.
     if (Type == QUIET_CHECKS && (StepAttacksBB[W_KNIGHT][to] & ci->ksq))
         (moveList++)->move = make<PROMOTION>(to - Delta, to, KNIGHT);
-    else
-        (void)ci; // Silence a warning under MSVC
 
-    return moveList;
+    return (void)ci, moveList; // Silence a warning under MSVC
   }
 
 
@@ -237,7 +235,7 @@ namespace {
                 && !(PseudoAttacks[Pt][from] & target & ci->checkSq[Pt]))
                 continue;
 
-            if (unlikely(ci->dcCandidates) && (ci->dcCandidates & from))
+            if (ci->dcCandidates && (ci->dcCandidates & from))
                 continue;
         }
 
@@ -256,7 +254,7 @@ namespace {
 
   template<Color Us, GenType Type> FORCE_INLINE
   ExtMove* generate_all(const Position& pos, ExtMove* moveList, Bitboard target,
-                        const CheckInfo* ci = NULL) {
+                        const CheckInfo* ci = nullptr) {
 
     const bool Checks = Type == QUIET_CHECKS;