X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=f2e501c1d862091545806cbc07b148e82e2754b5;hp=0fce07b1d03ea28313253c8866a5d120ecdf46d9;hb=87502c0fcbeb45c3bde797aa68d14536ea3a2029;hpb=bedf80a4c01ec5d265fc65114592761d37eeb85c diff --git a/src/material.cpp b/src/material.cpp index 0fce07b1..f2e501c1 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -182,7 +182,7 @@ Phase MaterialInfoTable::game_phase(const Position& pos) { MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) { Key key = pos.get_material_key(); - int index = key & (size - 1); + unsigned index = unsigned(key & (size - 1)); MaterialInfo* mi = entries + index; // If mi->key matches the position's material hash key, it means that we @@ -403,7 +403,7 @@ Key EndgameFunctions::buildKey(const string& keyCode) { s << char(upcase? toupper(keyCode[i]) : tolower(keyCode[i])); } s << 8 - keyCode.length() << "/8/8/8/8/8/8/8 w -"; - return Position(s.str()).get_material_key(); + return Position(s.str(), 0).get_material_key(); } const string EndgameFunctions::swapColors(const string& keyCode) {