X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitbase.cpp;h=b3ae5c5fb5498b737ad4b0ba206268b5f3e9485d;hp=ebf3c59a02355d780e31d79b48d8e70c36ee7d6c;hb=dc3a5f791ebf235444864e633564561811fa1244;hpb=098f645d26675bcf2180b290be77fe64a63de3ae diff --git a/src/bitbase.cpp b/src/bitbase.cpp index ebf3c59a..b3ae5c5f 100644 --- a/src/bitbase.cpp +++ b/src/bitbase.cpp @@ -85,9 +85,10 @@ bool Bitbases::probe(Square wksq, Square wpsq, Square bksq, Color us) { void Bitbases::init() { std::vector db(MAX_INDEX); + unsigned id = 0; // Initialize db with known win / draw positions - std::generate(db.begin(), db.end(), [](){ static unsigned id; return KPKPosition(id++); }); + std::generate(db.begin(), db.end(), [&id](){ return KPKPosition(id++); }); // Iterate through the positions until none of the unknown positions can be // changed to either wins or draws (15 cycles needed).