X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=19a334baa25727e35ee2f198b3e72d93e14b7267;hp=48cac56157d7038b4009bf723b8b441a93496573;hb=ad1f28bc1c1c5426fb8ab246f5d43ad57002b4d5;hpb=6608a16a6a6e062921fe318846c2c21e1fbcd729 diff --git a/src/material.cpp b/src/material.cpp index 48cac561..19a334ba 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -85,7 +85,7 @@ namespace { /// MaterialInfoTable c'tor and d'tor allocate and free the space for Endgames -MaterialInfoTable::MaterialInfoTable() { 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