apply if constexpr to additional instances

as a form of documentation, and a hint to the compiler.

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

No functional change
This commit is contained in:
Jonathan
2023-01-17 21:30:50 -07:00
committed by Joost VandeVondele
parent 734315ff30
commit a2038c1a01
4 changed files with 15 additions and 14 deletions

View File

@@ -158,7 +158,7 @@ Move MovePicker::select(Pred filter) {
while (cur < endMoves)
{
if (T == Best)
if constexpr (T == Best)
std::swap(*cur, *std::max_element(cur, endMoves));
if (*cur != ttMove && filter())