Remove pointless tte->static_value() != VALUE_NONE checks
authorJoona Kiiski <joona.kiiski@gmail.com>
Mon, 19 Jul 2010 15:48:16 +0000 (18:48 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 20 Jul 2010 18:01:10 +0000 (19:01 +0100)
Now in non-check nodes we are guaranteed to always have static value
in TT Entry.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index b57d040069cc2d9fbb7f1cae81f1174d5dca0c04..48c06fd3c56c29179572c0b56eb339c1973d06c1 100644 (file)
@@ -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();
         }