This was added in the initial commit of VPSC,
03c20a55c921ac07599be2ae19ae34209ec0d02e. The comment was incorrect. This does
*not* limit iteration because the variable type is unsigned. That is, it is
always >= 0. This was caught by enabling CXXFLAGS+=-Wtype-limits.
void VPSC::refine() {
bool solved=false;
- // Solve shouldn't loop indefinitely
- // ... but just to make sure we limit the number of iterations
- unsigned maxtries=100;
- while(!solved&&maxtries>=0) {
+ while(!solved) {
solved=true;
- maxtries--;
for(set<Block*>::const_iterator i=bs->begin();i!=bs->end();i++) {
Block *b=*i;
b->setUpInConstraints();