diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-12-09 15:49:59 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-12-09 15:49:59 +0000 |
| commit | 50ab3a3c4215474d437f9adcc4b725bed26767d7 (patch) | |
| tree | 0241555b1dc6efe9f35db7696c7e440e8a56bada /src/graphlayout.cpp | |
| parent | Remove unused var in header file (diff) | |
| parent | update to trunk (diff) | |
| download | inkscape-50ab3a3c4215474d437f9adcc4b725bed26767d7.tar.gz inkscape-50ab3a3c4215474d437f9adcc4b725bed26767d7.zip | |
Merge glib_hunt: cppification and removal of many glib GList/GSList/GHashTable
(bzr r14520)
Diffstat (limited to 'src/graphlayout.cpp')
| -rw-r--r-- | src/graphlayout.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/graphlayout.cpp b/src/graphlayout.cpp index 9b67ba0b5..39ffb6cc7 100644 --- a/src/graphlayout.cpp +++ b/src/graphlayout.cpp @@ -106,7 +106,6 @@ void graphlayout(std::vector<SPItem*> const &items) { return; } - using Inkscape::Util::GSListIterator; list<SPItem *> selected; filterConnectors(items,selected); if (selected.empty()) return; @@ -164,10 +163,11 @@ void graphlayout(std::vector<SPItem*> const &items) { continue; } unsigned u=i_iter->second; - GSList *nlist=iu->avoidRef->getAttachedConnectors(Avoid::runningFrom); + std::vector<SPItem *> nlist=iu->avoidRef->getAttachedConnectors(Avoid::runningFrom); list<SPItem *> connectors; - connectors.insert<GSListIterator<SPItem *> >(connectors.end(),nlist,NULL); + connectors.insert(connectors.end(), nlist.begin(), nlist.end()); + for (list<SPItem *>::iterator j(connectors.begin()); j != connectors.end(); ++j) { @@ -203,9 +203,6 @@ void graphlayout(std::vector<SPItem*> const &items) { } } } - if(nlist) { - g_slist_free(nlist); - } } const unsigned E = es.size(); double eweights[E]; |
