X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=19a334baa25727e35ee2f198b3e72d93e14b7267;hp=ef7428a3a989586ceb87dfa32ce082aa08712f93;hb=ad1f28bc1c1c5426fb8ab246f5d43ad57002b4d5;hpb=fecefbb99cb0147f37d6895765a315f34c935786 diff --git a/src/material.cpp b/src/material.cpp index ef7428a3..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 -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