]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
apply if constexpr to additional instances
[stockfish] / src / movepick.cpp
index 564adc286ea8221e01cac1dce4ac3d2d5cf72ca1..65155a73f7936a308b13d099cb9071e704ce4298 100644 (file)
@@ -1,6 +1,6 @@
 /*
   Stockfish, a UCI chess playing engine derived from Glaurung 2.1
-  Copyright (C) 2004-2022 The Stockfish developers (see AUTHORS file)
+  Copyright (C) 2004-2023 The Stockfish developers (see AUTHORS file)
 
   Stockfish is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -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())