summaryrefslogtreecommitdiffstats
path: root/src/libcola/connected_components.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-03-27 01:33:44 +0000
committerMartin Owens <doctormo@gmail.com>2014-03-27 01:33:44 +0000
commit5a4fb2325f60d292b47330f540b26a3279341c90 (patch)
treed2aa7967be25450b83e625025366c618101ae49f /src/libcola/connected_components.cpp
parentThe Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff)
parentRemove Snap menu item and improve grid menu item text (diff)
downloadinkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz
inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to 'src/libcola/connected_components.cpp')
-rw-r--r--src/libcola/connected_components.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcola/connected_components.cpp b/src/libcola/connected_components.cpp
index 0cf6ee45a..823f7cf6e 100644
--- a/src/libcola/connected_components.cpp
+++ b/src/libcola/connected_components.cpp
@@ -39,7 +39,7 @@ namespace cola {
Rectangle* r;
};
// Depth first search traversal of graph to find connected component
- void dfs(Node* v,
+ static void dfs(Node* v,
list<Node*>& remaining,
Component* component,
map<unsigned,pair<Component*,unsigned> > &cmap) {
@@ -77,7 +77,7 @@ namespace cola {
}
vector<Edge>::const_iterator ei;
SimpleConstraints::const_iterator ci;
- for(ei=es.begin();ei!=es.end();ei++) {
+ for(ei=es.begin();ei!=es.end();++ei) {
vs[ei->first].neighbours.push_back(&vs[ei->second]);
vs[ei->second].neighbours.push_back(&vs[ei->first]);
}
@@ -88,13 +88,13 @@ namespace cola {
dfs(v,remaining,component,cmap);
components.push_back(component);
}
- for(ei=es.begin();ei!=es.end();ei++) {
+ for(ei=es.begin();ei!=es.end();++ei) {
pair<Component*,unsigned> u=cmap[ei->first],
v=cmap[ei->second];
assert(u.first==v.first);
u.first->edges.push_back(make_pair(u.second,v.second));
}
- for(ci=scx.begin();ci!=scx.end();ci++) {
+ for(ci=scx.begin();ci!=scx.end();++ci) {
SimpleConstraint *c=*ci;
pair<Component*,unsigned> u=cmap[c->left],
v=cmap[c->right];
@@ -102,7 +102,7 @@ namespace cola {
u.first->scx.push_back(
new SimpleConstraint(u.second,v.second,c->gap));
}
- for(ci=scy.begin();ci!=scy.end();ci++) {
+ for(ci=scy.begin();ci!=scy.end();++ci) {
SimpleConstraint *c=*ci;
pair<Component*,unsigned> u=cmap[c->left],
v=cmap[c->right];