From: Joona Kiiski Date: Mon, 19 Jul 2010 15:48:16 +0000 (+0300) Subject: Remove pointless tte->static_value() != VALUE_NONE checks X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=28feb2c6b0f611352c3fb195e2f2960e992fc9ea;p=fairystockfish.git Remove pointless tte->static_value() != VALUE_NONE checks Now in non-check nodes we are guaranteed to always have static value in TT Entry. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index b57d040..48c06fd 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1083,8 +1083,9 @@ namespace { isCheck = pos.is_check(); if (!isCheck) { - if (tte && tte->static_value() != VALUE_NONE) + if (tte) { + assert(tte->static_value() != VALUE_NONE); ss->eval = tte->static_value(); ei.kingDanger[pos.side_to_move()] = tte->king_danger(); } @@ -1476,8 +1477,9 @@ namespace { } else { - if (tte && tte->static_value() != VALUE_NONE) + if (tte) { + assert(tte->static_value() != VALUE_NONE); ei.kingDanger[pos.side_to_move()] = tte->king_danger(); bestValue = tte->static_value(); }