// 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<Value>(key)) != NULL)
+ if (endgames.probe(key, e->evaluationFunction))
return e;
if (is_KXK<WHITE>(pos))
{
// Minor piece endgame with at least one minor piece per side and
// no pawns. Note that the case KmmK is already handled by KXK.
- assert((pos.pieces(KNIGHT, WHITE) | pos.pieces(BISHOP, WHITE)));
- assert((pos.pieces(KNIGHT, BLACK) | pos.pieces(BISHOP, BLACK)));
+ assert((pos.pieces(WHITE, KNIGHT) | pos.pieces(WHITE, BISHOP)));
+ assert((pos.pieces(BLACK, KNIGHT) | pos.pieces(BLACK, BISHOP)));
if ( pos.piece_count(WHITE, BISHOP) + pos.piece_count(WHITE, KNIGHT) <= 2
&& pos.piece_count(BLACK, BISHOP) + pos.piece_count(BLACK, KNIGHT) <= 2)
// scaling functions and we need to decide which one to use.
EndgameBase<ScaleFactor>* sf;
- if ((sf = endgames.probe<ScaleFactor>(key)) != NULL)
+ if (endgames.probe(key, sf))
{
e->scalingFunction[sf->color()] = sf;
return e;