]> git.sesse.net Git - stockfish/commitdiff
Simplify redundant condition.
authorDouglas Matos Gomes <dsmsgomes@gmail.com>
Fri, 9 Dec 2022 00:40:07 +0000 (21:40 -0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Fri, 9 Dec 2022 16:01:16 +0000 (17:01 +0100)
closes https://github.com/official-stockfish/Stockfish/pull/4270

No functional change

src/evaluate.cpp

index 93e665dfe859295dda5364904469f85cd4ad93eb..71c4e8d15a987d9c4c6302feb75d8b76aaa706d7 100644 (file)
@@ -1091,7 +1091,7 @@ Value Eval::evaluate(const Position& pos, int* complexity) {
   v = std::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1);
 
   // When not using NNUE, return classical complexity to caller
-  if (complexity && (!useNNUE || useClassical))
+  if (complexity && useClassical)
       *complexity = abs(v - psq);
 
   return v;