]> git.sesse.net Git - stockfish/commitdiff
Small cleanups
authorpb00067 <pb00067@phxl0401.wp.lan>
Wed, 1 Mar 2023 09:29:51 +0000 (10:29 +0100)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Tue, 14 Mar 2023 07:38:02 +0000 (08:38 +0100)
remove some unneeded assignments, typos, incorrect comments, add authors entry.

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

no functional change

AUTHORS
src/nnue/nnue_feature_transformer.h
src/position.cpp
src/search.cpp

diff --git a/AUTHORS b/AUTHORS
index 49f7009f10b16adb29f6eb8f7135fdb286a5bb8e..9b36111ea778a82c2fdc3f3ce238f1df8c7846c1 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -190,6 +190,7 @@ Sergei Antonov (saproj)
 Sergei Ivanov (svivanov72)
 Sergio Vieri (sergiovieri)
 sf-x
+Shahin M. Shahin (peregrine)
 Shane Booth (shane31)
 Shawn Varghese (xXH4CKST3RXx)
 Siad Daboul (Topologist)
index 8087ea55dd01c59baaabbebdad2acc5b1557dd66..a1888c7a36520c108a38f2517c7fa0947351f3b9 100644 (file)
@@ -363,7 +363,7 @@ namespace Stockfish::Eval::NNUE {
     // NOTE: The parameter states_to_update is an array of position states, ending with nullptr.
     //       All states must be sequential, that is states_to_update[i] must either be reachable
     //       by repeatedly applying ->previous from states_to_update[i+1] or states_to_update[i] == nullptr.
-    //       computed_st must be reachable by repeatadly applying ->previous on states_to_update[0], if not nullptr.
+    //       computed_st must be reachable by repeatedly applying ->previous on states_to_update[0], if not nullptr.
     template<Color Perspective, size_t N>
     void update_accumulator_incremental(const Position& pos, StateInfo* computed_st, StateInfo* states_to_update[N]) const {
       static_assert(N > 0);
index 632a40b5d617658dbb6bb188a4d6e12ca4b96449..aeac23a33f4c2d631bb3367517d3e20c45911f61 100644 (file)
@@ -765,9 +765,6 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
       // Update board and piece lists
       remove_piece(capsq);
 
-      if (type_of(m) == EN_PASSANT)
-          board[capsq] = NO_PIECE;
-
       // Update material hash key and prefetch access to materialTable
       k ^= Zobrist::psq[captured][capsq];
       st->materialKey ^= Zobrist::psq[captured][pieceCount[captured]];
index 7eb4a0c5c534eb2fe2ff6fbf44e753f8dedd4ae3..d6571a140f36b1e9ab5293895aff192df271a785 100644 (file)
@@ -601,7 +601,6 @@ namespace {
 
     assert(0 <= ss->ply && ss->ply < MAX_PLY);
 
-    (ss+1)->ttPv         = false;
     (ss+1)->excludedMove = bestMove = MOVE_NONE;
     (ss+2)->killers[0]   = (ss+2)->killers[1] = MOVE_NONE;
     (ss+2)->cutoffCnt    = 0;
@@ -1075,7 +1074,6 @@ moves_loop: // When in check, search starts here
               Depth singularDepth = (depth - 1) / 2;
 
               ss->excludedMove = move;
-              // the search with excludedMove will update ss->staticEval
               value = search<NonPV>(pos, ss, singularBeta - 1, singularBeta, singularDepth, cutNode);
               ss->excludedMove = MOVE_NONE;