diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-10-13 18:20:26 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-10-13 18:20:26 +0000 |
| commit | 8e30821fa53134256a47dc977e607b1949eeec33 (patch) | |
| tree | d51ef233932502ef56d563ac8497483878691628 /src/libavoid | |
| parent | Update to trunk (diff) | |
| parent | we don't have nondocked dialogs, so rewrite restoring dialogs on startup via ... (diff) | |
| download | inkscape-8e30821fa53134256a47dc977e607b1949eeec33.tar.gz inkscape-8e30821fa53134256a47dc977e607b1949eeec33.zip | |
Update to trunk
(bzr r11950.1.181)
Diffstat (limited to 'src/libavoid')
| -rw-r--r-- | src/libavoid/connector.cpp | 6 | ||||
| -rw-r--r-- | src/libavoid/orthogonal.cpp | 6 | ||||
| -rw-r--r-- | src/libavoid/vpsc.cpp | 18 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/libavoid/connector.cpp b/src/libavoid/connector.cpp index 3dbd941a4..cf8cfa11a 100644 --- a/src/libavoid/connector.cpp +++ b/src/libavoid/connector.cpp @@ -286,7 +286,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, const ConnEnd& conn } VertInf *altered = NULL; - VertInf *partner = NULL; + // VertInf *partner = NULL; bool isShape = false; if (type == (unsigned int) VertID::src) @@ -302,7 +302,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, const ConnEnd& conn _srcVert->visDirections = connEnd.directions(); altered = _srcVert; - partner = _dstVert; + // partner = _dstVert; } else // if (type == (unsigned int) VertID::tar) { @@ -317,7 +317,7 @@ void ConnRef::common_updateEndPoint(const unsigned int type, const ConnEnd& conn _dstVert->visDirections = connEnd.directions(); altered = _dstVert; - partner = _srcVert; + // partner = _srcVert; } // XXX: Seems to be faster to just remove the edges and recreate diff --git a/src/libavoid/orthogonal.cpp b/src/libavoid/orthogonal.cpp index d0a899252..b5ef8d7e8 100644 --- a/src/libavoid/orthogonal.cpp +++ b/src/libavoid/orthogonal.cpp @@ -1510,7 +1510,7 @@ extern void generateStaticOrthogonalVisGraph(Router *router) const int pass = 1; processEventVert(router, scanline, segments, events[i], pass); } - COLA_ASSERT(scanline.size() == 0); + COLA_ASSERT(scanline.empty()); for (unsigned i = 0; i < totalEvents; ++i) { delete events[i]; @@ -1589,7 +1589,7 @@ extern void generateStaticOrthogonalVisGraph(Router *router) const int pass = 1; processEventHori(router, scanline, vertSegments, events[i], pass); } - COLA_ASSERT(scanline.size() == 0); + COLA_ASSERT(scanline.empty()); for (unsigned i = 0; i < totalEvents; ++i) { delete events[i]; @@ -1879,7 +1879,7 @@ static void buildOrthogonalChannelInfo(Router *router, processShiftEvent(router, scanline, segmentList, events[i], dim, pass); } - COLA_ASSERT(scanline.size() == 0); + COLA_ASSERT(scanline.empty()); for (unsigned i = 0; i < totalEvents; ++i) { delete events[i]; diff --git a/src/libavoid/vpsc.cpp b/src/libavoid/vpsc.cpp index 1646ddaaa..bdf01d51c 100644 --- a/src/libavoid/vpsc.cpp +++ b/src/libavoid/vpsc.cpp @@ -104,7 +104,7 @@ void IncSolver::copyResult() { for(Variables::const_iterator i=vs.begin();i!=vs.end();++i) { Variable* v=*i; v->finalPosition=v->position(); - COLA_ASSERT(v->finalPosition==v->finalPosition); + COLA_ASSERT(v->finalPosition==v->finalPosition);/// TODO: check! Possibly some error in this line... } } @@ -132,16 +132,16 @@ bool IncSolver::constraintGraphIsCyclic(const unsigned n, Variable* const vs[]) varmap[vs[i]]->out.insert(varmap[r]); } } - while(graph.size()>0) { + while(!graph.empty()) { node *u=NULL; vector<node*>::iterator i=graph.begin(); for(;i!=graph.end();++i) { u=*i; - if(u->in.size()==0) { + if(u->in.empty()) { break; } } - if(i==graph.end() && graph.size()>0) { + if(i==graph.end() && !graph.empty()) { //cycle found! return true; } else { @@ -189,16 +189,16 @@ bool IncSolver::blockGraphIsCyclic() { c=b->findMinOutConstraint(); } } - while(graph.size()>0) { + while(!graph.empty()) { node *u=NULL; vector<node*>::iterator i=graph.begin(); for(;i!=graph.end();++i) { u=*i; - if(u->in.size()==0) { + if(u->in.empty()) { break; } } - if(i==graph.end() && graph.size()>0) { + if(i==graph.end() && !graph.empty()) { //cycle found! return true; } else { @@ -287,7 +287,7 @@ bool IncSolver::satisfy() { v->unsatisfiable=true; continue; } - } catch(UnsatisfiableException e) { + } catch(UnsatisfiableException& e) { e.path.push_back(v); std::cerr << "Unsatisfiable:" << std::endl; for(std::vector<Constraint*>::iterator r=e.path.begin(); @@ -1162,10 +1162,10 @@ Constraint* Block::splitBetween(Variable* const vl, Variable* const vr, f<<" need to split between: "<<*vl<<" and "<<*vr<<endl; #endif Constraint *c=findMinLMBetween(vl, vr); + if(c!=NULL) { #ifdef LIBVPSC_LOGGING f<<" going to split on: "<<*c<<endl; #endif - if(c!=NULL) { split(lb,rb,c); deleted = true; } |
