From a7f2b2ba3f13ceb60376802f4a31e104153839e8 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 17 Feb 2015 03:00:37 +0100 Subject: At first, I was thinking "I just have to go to the selection file, and change that GSList* with a std::list, then resolve the few problems" So, i tried that. And I will continue tomorrow, and the days after, on and on. (bzr r13922.1.1) --- src/graphlayout.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/graphlayout.cpp') diff --git a/src/graphlayout.cpp b/src/graphlayout.cpp index e5d61ab64..613440269 100644 --- a/src/graphlayout.cpp +++ b/src/graphlayout.cpp @@ -88,9 +88,9 @@ struct CheckProgress : TestConvergence { * Scans the items list and places those items that are * not connectors in filtered */ -void filterConnectors(GSList const *const items, list &filtered) { - for(GSList *i=(GSList *)items; i!=NULL; i=i->next) { - SPItem *item=SP_ITEM(i->data); +void filterConnectors(SelContainer const &items, list &filtered) { + for(SelContainer::const_iterator i=items.begin();i!=items.end();i++){ + SPItem *item = SP_ITEM(*i); if(!isConnector(item)) { filtered.push_back(item); } @@ -101,8 +101,8 @@ void filterConnectors(GSList const *const items, list &filtered) { * connectors between them, and uses graph layout techniques to find * a nice layout */ -void graphlayout(GSList const *const items) { - if(!items) { +void graphlayout(SelContainer const &items) { + if(items.empty()) { return; } -- cgit v1.2.3