summaryrefslogtreecommitdiffstats
path: root/src/graphlayout.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <mc@localhost.localdomain>2015-02-17 02:00:37 +0000
committerMarc Jeanmougin <mc@localhost.localdomain>2015-02-17 02:00:37 +0000
commita7f2b2ba3f13ceb60376802f4a31e104153839e8 (patch)
tree6db393e9e5a0a9ab7916a0e7ed29d875efa39ea1 /src/graphlayout.cpp
parentdevice-manager: Get rid of GLists (diff)
downloadinkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.tar.gz
inkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.zip
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)
Diffstat (limited to 'src/graphlayout.cpp')
-rw-r--r--src/graphlayout.cpp10
1 files changed, 5 insertions, 5 deletions
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<SPItem *> &filtered) {
- for(GSList *i=(GSList *)items; i!=NULL; i=i->next) {
- SPItem *item=SP_ITEM(i->data);
+void filterConnectors(SelContainer const &items, list<SPItem *> &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<SPItem *> &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;
}