Skip to content

Commit

Permalink
Remove an useless assignment
Browse files Browse the repository at this point in the history
The assignment (ss + 1)->excludedMove = Move::none() can be simplified away because when that line is reached, (ss + 1)->excludedMove is always already none. The only moment stack[x]->excludedMove is modified, is during singular search, but it is reset to none right after the singular search is finished.

closes #5153

No functional change
  • Loading branch information
gab8192 authored and vondele committed Apr 11, 2024
1 parent de22442 commit d6bdcec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ Value Search::Worker::search(

assert(0 <= ss->ply && ss->ply < MAX_PLY);

(ss + 1)->excludedMove = bestMove = Move::none();
bestMove = Move::none();
(ss + 2)->killers[0] = (ss + 2)->killers[1] = Move::none();
(ss + 2)->cutoffCnt = 0;
ss->multipleExtensions = (ss - 1)->multipleExtensions;
Expand Down

0 comments on commit d6bdcec

Please sign in to comment.