- while (std::accumulate(db.begin(), db.end(), false, [&](bool repeat, KPKPosition& pos)
- { return (pos == UNKNOWN && pos.classify(db) != UNKNOWN) || repeat; })){}
+ while (repeat)
+ for (repeat = idx = 0; idx < MAX_INDEX; ++idx)
+ repeat |= (db[idx] == UNKNOWN && db[idx].classify(db) != UNKNOWN);