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/resource-manager.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/resource-manager.cpp')
| -rw-r--r-- | src/resource-manager.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resource-manager.cpp b/src/resource-manager.cpp index dbff27827..18d7c6ba2 100644 --- a/src/resource-manager.cpp +++ b/src/resource-manager.cpp @@ -179,9 +179,9 @@ std::vector<Glib::ustring> ResourceManagerImpl::findBrokenLinks( SPDocument *doc std::set<Glib::ustring> uniques; if ( doc ) { - GSList const *images = doc->getResourceList("image"); - for (GSList const *it = images; it; it = it->next) { - Inkscape::XML::Node *ir = static_cast<SPObject *>(it->data)->getRepr(); + std::set<SPObject *> images = doc->getResourceList("image"); + for (std::set<SPObject *>::const_iterator it = images.begin(); it != images.end(); ++it) { + Inkscape::XML::Node *ir = (*it)->getRepr(); gchar const *href = ir->attribute("xlink:href"); if ( href && ( uniques.find(href) == uniques.end() ) ) { @@ -305,10 +305,10 @@ bool ResourceManagerImpl::fixupBrokenLinks(SPDocument *doc) bool savedUndoState = DocumentUndo::getUndoSensitive(doc); DocumentUndo::setUndoSensitive(doc, true); - - GSList const *images = doc->getResourceList("image"); - for (GSList const *it = images; it; it = it->next) { - Inkscape::XML::Node *ir = static_cast<SPObject *>(it->data)->getRepr(); + + std::set<SPObject *> images = doc->getResourceList("image"); + for (std::set<SPObject *>::const_iterator it = images.begin(); it != images.end(); ++it) { + Inkscape::XML::Node *ir = (*it)->getRepr(); gchar const *href = ir->attribute("xlink:href"); if ( href ) { |
