From: rwst Date: Tue, 23 May 2006 07:41:37 +0000 (+0000) Subject: make loop var unsigned etc, remove compiler warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ec4f584e057e5237a58a3eed6f3f82e26fa28ee5;p=inkscape.git make loop var unsigned etc, remove compiler warnings --- diff --git a/src/removeoverlap/remove_rectangle_overlap.cpp b/src/removeoverlap/remove_rectangle_overlap.cpp index 6f6ace03a..9fbef647b 100755 --- a/src/removeoverlap/remove_rectangle_overlap.cpp +++ b/src/removeoverlap/remove_rectangle_overlap.cpp @@ -40,19 +40,18 @@ double Rectangle::yBorder=0; * too much in the first pass. */ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double yBorder) { - assert(0 <= n); try { // The extra gap avoids numerical imprecision problems Rectangle::setXBorder(xBorder+EXTRA_GAP); Rectangle::setYBorder(yBorder+EXTRA_GAP); Variable **vs=new Variable*[n]; - for(int i=0;idesiredPosition; } VPSC vpsc_x(n,vs,m,cs); @@ -62,7 +61,7 @@ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double f.close(); #endif vpsc_x.solve(); - for(int i=0;imoveCentreX(vs[i]->position()); } for(int i = 0; i < m; ++i) { @@ -80,7 +79,7 @@ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double f.close(); #endif vpsc_y.solve(); - for(int i=0;imoveCentreY(vs[i]->position()); rs[i]->moveCentreX(oldX[i]); } @@ -102,14 +101,14 @@ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double delete cs[i]; } delete [] cs; - for(int i=0;imoveCentreX(vs[i]->position()); delete vs[i]; } delete [] vs; } catch (char const *str) { std::cerr<=0) { + while(!solved&&maxtries>0) { solved=true; maxtries--; for(set::const_iterator i=bs->begin();i!=bs->end();++i) {