]> git.sesse.net Git - stockfish/blobdiff - src/material.cpp
Remove some useless include
[stockfish] / src / material.cpp
index ef7428a3a989586ceb87dfa32ce082aa08712f93..19a334baa25727e35ee2f198b3e72d93e14b7267 100644 (file)
@@ -85,7 +85,7 @@ namespace {
 
 /// MaterialInfoTable c'tor and d'tor allocate and free the space for Endgames
 
-void MaterialInfoTable::init() { Base::init(); funcs = new Endgames(); }
+void MaterialInfoTable::init() { Base::init(); if (!funcs) funcs = new Endgames(); }
 MaterialInfoTable::~MaterialInfoTable() { delete funcs; }
 
 
@@ -98,7 +98,7 @@ MaterialInfoTable::~MaterialInfoTable() { delete funcs; }
 MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) const {
 
   Key key = pos.get_material_key();
-  MaterialInfo* mi = find(key);
+  MaterialInfo* mi = probe(key);
 
   // If mi->key matches the position's material hash key, it means that we
   // have analysed this material configuration before, and we can simply