]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Remove some pointless micro-optimizations
[stockfish] / src / position.cpp
index 6e8b03d1afb3bfabba40a34a52a216e01b49c817..cd91b07fe773e5b9ba766d4055a36867c72b5c5f 100644 (file)
@@ -501,8 +501,7 @@ bool Position::legal(Move m, Bitboard pinned) const {
 
   // A non-king move is legal if and only if it is not pinned or it
   // is moving along the ray towards or away from the king.
 
   // A non-king move is legal if and only if it is not pinned or it
   // is moving along the ray towards or away from the king.
-  return   !pinned
-        || !(pinned & from)
+  return   !(pinned & from)
         ||  aligned(from, to_sq(m), square<KING>(us));
 }
 
         ||  aligned(from, to_sq(m), square<KING>(us));
 }
 
@@ -595,8 +594,7 @@ bool Position::gives_check(Move m, const CheckInfo& ci) const {
       return true;
 
   // Is there a discovered check?
       return true;
 
   // Is there a discovered check?
-  if (    ci.dcCandidates
-      && (ci.dcCandidates & from)
+  if (   (ci.dcCandidates & from)
       && !aligned(from, to, ci.ksq))
       return true;
 
       && !aligned(from, to, ci.ksq))
       return true;