]> git.sesse.net Git - stockfish/blobdiff - src/material.cpp
Raise kingDanger threshold and adjust constant term #2087
[stockfish] / src / material.cpp
index 2e68ee68dd333a5042d524370b2d5e56fb95c5df..ee5d4bceabdaa5b056f0f712fd4cf85856779f57 100644 (file)
@@ -149,9 +149,9 @@ Entry* probe(const Position& pos) {
 
   // OK, we didn't find any special evaluation function for the current material
   // configuration. Is there a suitable specialized scaling function?
-  const EndgameBase<ScaleFactor>* sf;
+  const auto* sf = pos.this_thread()->endgames.probe<ScaleFactor>(key);
 
-  if ((sf = pos.this_thread()->endgames.probe<ScaleFactor>(key)) != nullptr)
+  if (sf)
   {
       e->scalingFunction[sf->strongSide] = sf; // Only strong color assigned
       return e;