summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:58:51 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:58:51 +0000
commite5143d65bb57d4ce623e6220585b099e6d2ee453 (patch)
tree4ff78f6fa8f0c1b740fd43b0ade2b91dbf9226d0 /src/main.cpp
parentRemove deprecated Autotools and btool files. Please use CMake instead (diff)
parentMerged trunk (diff)
downloadinkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.tar.gz
inkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.zip
Merged gsoc work. Created better data structure for selections, replaced SPObject children list, improved spray tool, split tests to separate executables
(bzr r15047)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 990909701..28bdf8359 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1209,8 +1209,8 @@ static int sp_process_file_list(GSList *fl)
std::vector<SPItem*> items;
SPRoot *root = doc->getRoot();
doc->ensureUpToDate();
- for ( SPObject *iter = root->firstChild(); iter ; iter = iter->getNext()) {
- SPItem* item = (SPItem*) iter;
+ for (auto& iter: root->children) {
+ SPItem* item = (SPItem*) &iter;
if (! (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item) || SP_IS_GROUP(item))) {
continue;
}
@@ -1464,10 +1464,8 @@ do_query_all_recurse (SPObject *o)
}
}
- SPObject *child = o->children;
- while (child) {
- do_query_all_recurse (child);
- child = child->next;
+ for(auto& child: o->children) {
+ do_query_all_recurse (&child);
}
}