From: VoyagerOne Date: Thu, 27 Jul 2017 09:14:18 +0000 (-0700) Subject: Remove redundant if-statements X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=722e1e0da6187916d76a2663f98ac105bc620763 Remove redundant if-statements No functional change Closes #1173 --- diff --git a/src/search.cpp b/src/search.cpp index 6e5d6ab3..a59d8d9b 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -682,9 +682,9 @@ namespace { eval = ss->staticEval = evaluate(pos); // Can ttValue be used as a better position evaluation? - if (ttValue != VALUE_NONE) - if (tte->bound() & (ttValue > eval ? BOUND_LOWER : BOUND_UPPER)) - eval = ttValue; + if ( ttValue != VALUE_NONE + && (tte->bound() & (ttValue > eval ? BOUND_LOWER : BOUND_UPPER))) + eval = ttValue; } else { @@ -1212,9 +1212,9 @@ moves_loop: // When in check search starts from here ss->staticEval = bestValue = evaluate(pos); // Can ttValue be used as a better position evaluation? - if (ttValue != VALUE_NONE) - if (tte->bound() & (ttValue > bestValue ? BOUND_LOWER : BOUND_UPPER)) - bestValue = ttValue; + if ( ttValue != VALUE_NONE + && (tte->bound() & (ttValue > bestValue ? BOUND_LOWER : BOUND_UPPER))) + bestValue = ttValue; } else ss->staticEval = bestValue =