X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=e22942128f4a98974f856ecefb836c15b091ff8a;hp=3ff42daebc3d777ebbf34c8c65441a8cdada5517;hb=1c7a727795b82de75ed83e9648a94134ef75576a;hpb=91cc82aa2566e6b6fa60cf82298250d6e4e2dd46 diff --git a/src/material.cpp b/src/material.cpp index 3ff42dae..e2294212 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008-2014 Marco Costalba, Joona Kiiski, Tord Romstad + Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -139,7 +139,7 @@ Entry* probe(const Position& pos) { // Let's look if we have a specialized evaluation function for this particular // material configuration. Firstly we look for a fixed configuration one, then // for a generic one if the previous search failed. - if (pos.this_thread()->endgames.probe(key, e->evaluationFunction)) + if ((e->evaluationFunction = pos.this_thread()->endgames.probe(key)) != nullptr) return e; if (is_KXK(pos)) @@ -158,7 +158,7 @@ Entry* probe(const Position& pos) { // configuration. Is there a suitable specialized scaling function? EndgameBase* sf; - if (pos.this_thread()->endgames.probe(key, sf)) + if ((sf = pos.this_thread()->endgames.probe(key)) != nullptr) { e->scalingFunction[sf->strong_side()] = sf; // Only strong color assigned return e;