]> git.sesse.net Git - stockfish/commitdiff
Annotate an unlikely condition
authorMarco Costalba <mcostalba@gmail.com>
Sat, 27 Jul 2013 09:34:15 +0000 (11:34 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 27 Jul 2013 09:34:15 +0000 (11:34 +0200)
No functional change.

src/position.cpp

index f7a89e07f3d88afacdf7f6ae18b80a706834d77e..60d619bed4e0636a34b27cb93321dd446a9d6bfc 100644 (file)
@@ -652,7 +652,7 @@ bool Position::move_gives_check(Move m, const CheckInfo& ci) const {
       return true;
 
   // Discovery check ?
       return true;
 
   // Discovery check ?
-  if (ci.dcCandidates && (ci.dcCandidates & from))
+  if (unlikely(ci.dcCandidates) && (ci.dcCandidates & from))
   {
       // For pawn and king moves we need to verify also direction
       if (   (pt != PAWN && pt != KING)
   {
       // For pawn and king moves we need to verify also direction
       if (   (pt != PAWN && pt != KING)