]> git.sesse.net Git - stockfish/blobdiff - src/material.cpp
Use move assignment in movegen.h
[stockfish] / src / material.cpp
index 3ff42daebc3d777ebbf34c8c65441a8cdada5517..e22942128f4a98974f856ecefb836c15b091ff8a 100644 (file)
@@ -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<Value>(key)) != nullptr)
       return e;
 
   if (is_KXK<WHITE>(pos))
@@ -158,7 +158,7 @@ Entry* probe(const Position& pos) {
   // configuration. Is there a suitable specialized scaling function?
   EndgameBase<ScaleFactor>* sf;
 
-  if (pos.this_thread()->endgames.probe(key, sf))
+  if ((sf = pos.this_thread()->endgames.probe<ScaleFactor>(key)) != nullptr)
   {
       e->scalingFunction[sf->strong_side()] = sf; // Only strong color assigned
       return e;