1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Remove redundant if-statements

No functional change

Closes #1173
This commit is contained in:
VoyagerOne 2017-07-27 02:14:18 -07:00 committed by Joona Kiiski
parent 973ede008a
commit 722e1e0da6

View file

@ -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 =