summaryrefslogtreecommitdiffstats
path: root/src/libvpsc/solve_VPSC.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-10-26 12:27:05 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-10-26 12:27:05 +0000
commit9b2d4924cf0f30df461236c7850c8e38480d8ad3 (patch)
tree560ebd4e32dc9c9645287e8f5a8470bde91d7817 /src/libvpsc/solve_VPSC.cpp
parentUpdate to trunk (diff)
parentFix memleak in reference counting introduced in r12532. (diff)
downloadinkscape-9b2d4924cf0f30df461236c7850c8e38480d8ad3.tar.gz
inkscape-9b2d4924cf0f30df461236c7850c8e38480d8ad3.zip
Update to trunk
(bzr r11950.1.189)
Diffstat (limited to 'src/libvpsc/solve_VPSC.cpp')
-rw-r--r--src/libvpsc/solve_VPSC.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libvpsc/solve_VPSC.cpp b/src/libvpsc/solve_VPSC.cpp
index f9bed649c..83cb517b6 100644
--- a/src/libvpsc/solve_VPSC.cpp
+++ b/src/libvpsc/solve_VPSC.cpp
@@ -301,16 +301,16 @@ bool Solver::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 {
@@ -358,16 +358,16 @@ bool Solver::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 {