diff options
| author | Tim Dwyer <tgdwyer@gmail.com> | 2006-01-26 05:54:23 +0000 |
|---|---|---|
| committer | tgdwyer <tgdwyer@users.sourceforge.net> | 2006-01-26 05:54:23 +0000 |
| commit | e61ac5b1293a5df6b4a20d06461ecf3c767a2a38 (patch) | |
| tree | ba42601af7ea7231bd0727f870a693f541d7b61a /src/removeoverlap/generate-constraints.cpp | |
| parent | Constructor cleaned up a bit. (diff) | |
| download | inkscape-e61ac5b1293a5df6b4a20d06461ecf3c767a2a38.tar.gz inkscape-e61ac5b1293a5df6b4a20d06461ecf3c767a2a38.zip | |
Cleanup.
(bzr r32)
Diffstat (limited to 'src/removeoverlap/generate-constraints.cpp')
| -rw-r--r-- | src/removeoverlap/generate-constraints.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/removeoverlap/generate-constraints.cpp b/src/removeoverlap/generate-constraints.cpp index 98a60484a..efa477449 100644 --- a/src/removeoverlap/generate-constraints.cpp +++ b/src/removeoverlap/generate-constraints.cpp @@ -169,7 +169,6 @@ int generateXConstraints(Rectangle *rs[], double weights[], const int n, Variabl vector<Constraint*> constraints; vars=new Variable*[n]; for(i=0;i<n;i++) { - assert(rs[i]->width()<1e40); vars[i]=new Variable(i,rs[i]->getCentreX(),weights[i]); Node *v = new Node(vars[i],rs[i],rs[i]->getCentreX()); events[ctr++]=new Event(Open,v,rs[i]->getMinY()); @@ -190,17 +189,13 @@ int generateXConstraints(Rectangle *rs[], double weights[], const int n, Variabl ); } else { NodeSet::iterator it=scanline.find(v); - assert(*it==v); if(it--!=scanline.begin()) { - assert(scanline.size()>1); Node *u=*it; v->firstAbove=u; u->firstBelow=v; } it=scanline.find(v); - assert(*it==v); if(++it!=scanline.end()) { - assert(scanline.size()>1); Node *u=*it; v->firstBelow=u; u->firstAbove=v; @@ -230,13 +225,11 @@ int generateXConstraints(Rectangle *rs[], double weights[], const int n, Variabl } else { Node *l=v->firstAbove, *r=v->firstBelow; if(l!=NULL) { - assert(l->firstBelow==v); double sep = (v->r->width()+l->r->width())/2.0; constraints.push_back(new Constraint(l->v,v->v,sep)); l->firstBelow=v->firstBelow; } if(r!=NULL) { - assert(r->firstAbove==v); double sep = (v->r->width()+r->r->width())/2.0; constraints.push_back(new Constraint(v->v,r->v,sep)); r->firstAbove=v->firstAbove; |
