Permalink
Browse files

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 <mcostalba@gmail.com>
  • Loading branch information...
1 parent cd0c4e8 commit a9d1eecb53eadb102746d90e717115da9da7dda7 @zamar zamar committed with Jul 19, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/search.cpp
View
@@ -1072,8 +1072,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();
}
@@ -1464,8 +1465,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();
}

0 comments on commit a9d1eec

Please sign in to comment.