X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=ee5d4bceabdaa5b056f0f712fd4cf85856779f57;hp=2e68ee68dd333a5042d524370b2d5e56fb95c5df;hb=82ad9ce9cfb0eff33f1d781f329f7c5dc0b277eb;hpb=95ba7f78d5e025499ec8124e37e9f3b769660e4a diff --git a/src/material.cpp b/src/material.cpp index 2e68ee68..ee5d4bce 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -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* sf; + const auto* sf = pos.this_thread()->endgames.probe(key); - if ((sf = pos.this_thread()->endgames.probe(key)) != nullptr) + if (sf) { e->scalingFunction[sf->strongSide] = sf; // Only strong color assigned return e;