X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=50b3a2aaa0a5d7ea30c283b2136c719704997c1d;hp=0e3ca8320e7a586a5a0f99cbf0a85e2b103d52d8;hb=7a8429d9f15a45c5a60f98c4aed798d10d511300;hpb=dda0fa1a43e1096415ff8f83dd14e6322f1a8e68 diff --git a/src/material.cpp b/src/material.cpp index 0e3ca832..50b3a2aa 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -108,7 +108,7 @@ MaterialEntry* MaterialTable::probe(const Position& pos) { // Let's look if we have a specialized evaluation function for this // particular material configuration. First we look for a fixed // configuration one, then a generic one if previous search failed. - if ((e->evaluationFunction = endgames.probe(key)) != NULL) + if (endgames.probe(key, e->evaluationFunction)) return e; if (is_KXK(pos)) @@ -145,7 +145,7 @@ MaterialEntry* MaterialTable::probe(const Position& pos) { // scaling functions and we need to decide which one to use. EndgameBase* sf; - if ((sf = endgames.probe(key)) != NULL) + if (endgames.probe(key, sf)) { e->scalingFunction[sf->color()] = sf; return e;