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

Remove some obsolete asserts on TT values

Now that insert_pv_in_tt() stores VALUE_NONE in
TT's position evaluation those 2 asserts are
obselete.

No functional change.
This commit is contained in:
Marco Costalba 2012-12-31 16:28:40 +01:00
parent 896420b166
commit 193741218c

View file

@ -584,15 +584,9 @@ namespace {
else if (tte) else if (tte)
{ {
// Following asserts are valid only in single thread condition because // Never assume anything on values stored in TT
// TT access is always racy and its contents cannot be trusted. if ( (ss->staticEval = eval = tte->static_value()) == VALUE_NONE
assert(tte->static_value() != VALUE_NONE || Threads.size() > 1); ||(ss->evalMargin = tte->static_value_margin()) == VALUE_NONE)
assert(ttValue != VALUE_NONE || tte->type() == BOUND_NONE || Threads.size() > 1);
ss->staticEval = eval = tte->static_value();
ss->evalMargin = tte->static_value_margin();
if (eval == VALUE_NONE || ss->evalMargin == VALUE_NONE) // Due to a race
eval = ss->staticEval = evaluate(pos, ss->evalMargin); eval = ss->staticEval = evaluate(pos, ss->evalMargin);
// Can ttValue be used as a better position evaluation? // Can ttValue be used as a better position evaluation?
@ -1175,12 +1169,9 @@ split_point_start: // At split points actual search starts from here
} }
else if (tte) else if (tte)
{ {
assert(tte->static_value() != VALUE_NONE || Threads.size() > 1); // Never assume anything on values stored in TT
if ( (ss->staticEval = bestValue = tte->static_value()) == VALUE_NONE
ss->staticEval = bestValue = tte->static_value(); ||(ss->evalMargin = tte->static_value_margin()) == VALUE_NONE)
ss->evalMargin = tte->static_value_margin();
if (ss->staticEval == VALUE_NONE || ss->evalMargin == VALUE_NONE) // Due to a race
ss->staticEval = bestValue = evaluate(pos, ss->evalMargin); ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);
} }
else else