]> git.sesse.net Git - stockfish/commitdiff
Assorted trivial cleanups
authorStéphane Nicolet <cassio@free.fr>
Sat, 14 Sep 2019 06:33:00 +0000 (08:33 +0200)
committerStéphane Nicolet <cassio@free.fr>
Sat, 14 Sep 2019 06:33:00 +0000 (08:33 +0200)
No functional change

AUTHORS
src/position.cpp
src/search.cpp

diff --git a/AUTHORS b/AUTHORS
index 207c5a85c4a9a3b9e1dab29c88231af9c86f00fb..e55f94fb5a9046b6a469cb1da21a86ba75bea893 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -60,6 +60,7 @@ Jacques B. (Timshel)
 Jan Ondruš (hxim)
 Jared Kish (Kurtbusch)
 Jarrod Torriero (DU-jdto)
 Jan Ondruš (hxim)
 Jared Kish (Kurtbusch)
 Jarrod Torriero (DU-jdto)
+Jean Gauthier (QuaisBla)
 Jean-Francois Romang (jromang)
 Jerry Donald Watson (jerrydonaldwatson)
 Jonathan Calovski (Mysseno)
 Jean-Francois Romang (jromang)
 Jerry Donald Watson (jerrydonaldwatson)
 Jonathan Calovski (Mysseno)
index db66f416559c7add343f9e035bff4b1842566868..6336a5ed193bb4c3aef1731b7c1bcfda858d3e0a 100644 (file)
@@ -1305,8 +1305,8 @@ bool Position::pos_is_ok() const {
               continue;
 
           if (   piece_on(castlingRookSquare[cr]) != make_piece(c, ROOK)
               continue;
 
           if (   piece_on(castlingRookSquare[cr]) != make_piece(c, ROOK)
-              || castlingRightsMask[castlingRookSquare[cr]] != (cr)
-              || (castlingRightsMask[square<KING>(c)] & (cr)) != (cr))
+              || castlingRightsMask[castlingRookSquare[cr]] != cr
+              || (castlingRightsMask[square<KING>(c)] & cr) != cr)
               assert(0 && "pos_is_ok: Castling");
       }
 
               assert(0 && "pos_is_ok: Castling");
       }
 
index f8535a5f2e2851bfe1e387cc2ac0d735d422d1f4..79942bcdf1cfec5b912aede7cdb246d46b3029ec 100644 (file)
@@ -1050,7 +1050,7 @@ moves_loop: // When in check, search starts from here
               if (!pos.see_ge(move, Value(-(31 - std::min(lmrDepth, 18)) * lmrDepth * lmrDepth)))
                   continue;
           }
               if (!pos.see_ge(move, Value(-(31 - std::min(lmrDepth, 18)) * lmrDepth * lmrDepth)))
                   continue;
           }
-          else if (  (!givesCheck || !extension)
+          else if (  !(givesCheck && extension)
                    && !pos.see_ge(move, Value(-199) * (depth / ONE_PLY))) // (~20 Elo)
                   continue;
       }
                    && !pos.see_ge(move, Value(-199) * (depth / ONE_PLY))) // (~20 Elo)
                   continue;
       }
@@ -1096,7 +1096,7 @@ moves_loop: // When in check, search starts from here
           if ((ss-1)->moveCount > 15)
               r -= ONE_PLY;
 
           if ((ss-1)->moveCount > 15)
               r -= ONE_PLY;
 
-          // Decrease reduction if move has been singularly extended
+          // Decrease reduction if ttMove has been singularly extended
           r -= singularLMR * ONE_PLY;
 
           if (!captureOrPromotion)
           r -= singularLMR * ONE_PLY;
 
           if (!captureOrPromotion)